X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger%2FIOStreamTarget.hh;h=18003c0a9d6fc3717632ed07f870de00598e86bf;hb=412024ed31a4ab4eaea7a4165a434f8efebee325;hp=3e0b61ee8a34655dde808a55a88ad604af4685b2;hpb=044a1bfb46ce16c3daac307b8c684604b43dd4cf;p=senf.git diff --git a/Utils/Logger/IOStreamTarget.hh b/Utils/Logger/IOStreamTarget.hh index 3e0b61e..18003c0 100644 --- a/Utils/Logger/IOStreamTarget.hh +++ b/Utils/Logger/IOStreamTarget.hh @@ -1,8 +1,8 @@ // $Id$ // -// Copyright (C) 2007 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer NETwork research (NET) +// Copyright (C) 2007 +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY // Stefan Bund // // This program is free software; you can redistribute it and/or modify @@ -23,8 +23,8 @@ /** \file \brief IOStreamTarget public header */ -#ifndef HH_IOStreamTarget_ -#define HH_IOStreamTarget_ 1 +#ifndef HH_SENF_Utils_Logger_IOStreamTarget_ +#define HH_SENF_Utils_Logger_IOStreamTarget_ 1 // Custom includes #include @@ -37,12 +37,12 @@ namespace senf { namespace log { - /** \brief Write log messages to arbitrary std::ostream + /** \brief Write %log messages to arbitrary std::ostream - This target will write log messages to an arbitrary std::ostream in the format -
-         [] 
-        
+ This target will write %log messages to an arbitrary std::ostream in the format + \verbatim [][] \endverbatim + + The \e area will be omitted if it is \c senf::log::DefaultArea. The date formatting is set using the Boost.DateTime date_facet, e.g.: \code @@ -73,16 +73,15 @@ namespace log { /////////////////////////////////////////////////////////////////////////// protected: - - private: - void v_write(boost::posix_time::ptime timestamp, std::string const & stream, + void v_write(time_type timestamp, std::string const & stream, std::string const & area, unsigned level, std::string const & message); + private: std::ostream & stream_; + static char const * const LEVELNAMES_[8]; }; - }} ///////////////////////////////hh.e////////////////////////////////////////