X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FLogger.hh;h=99880a885cff281e1e5ab44e5f9f1cbaf3ed0b21;hb=81ffa1c459b96dd44472bcef37e1e373934ee138;hp=b5d94a2cb8760774c15e43c45d6b746cbb2a1e05;hpb=85ab07d100a382467a42e19d741d403a7a96c951;p=senf.git diff --git a/Utils/Logger.hh b/Utils/Logger.hh index b5d94a2..99880a8 100644 --- a/Utils/Logger.hh +++ b/Utils/Logger.hh @@ -1,3 +1,5 @@ +// $Id$ +// // Copyright (C) 2007 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Kompetenzzentrum fuer Satelitenkommunikation (SatCom) @@ -23,11 +25,11 @@ /** \defgroup logger The SENF Logger - The Loggger infrastructure shall implement a highliy flexible compile- and run-time configurable - logging infrastructure supporting multiple streams, user defineable log areas and fine grained + The Loggger infrastructure shall implement a highly flexible compile- and run-time configurable + logging infrastructure supporting multiple streams, user definable log areas and fine grained log levels. Logging can be configured at compile and runtime on any combination of above parameters. The library supports a host of log targets and messages can be routed into multiple - targets at the same time. To allow concise usage of the libarary, a utlity to define logging + targets at the same time. To allow concise usage of the library, a utility to define logging defaults for any scope is provided. An important basic concept of the library is, that most of the macros take a variable number of @@ -41,7 +43,7 @@ \endcode The last sequence element always is the log message. Before that we have a number of log - parameters in arbitrary order. Since giving all the parameters in every log message is + parameters in arbitrary order. Since giving all the parameters in every log message is to verbose, there are two helpful constructs to reduce the verbosity. Using \ref SENF_LOG_DEFAULTS it is possible to define the default logging parameters to be used within a given scope. Using \ref SENF_LOG_DEF_ALIAS you can define an alias (which is a scoped symbol) as an arbitrary @@ -87,7 +89,7 @@ \endcode Currently, the library is not implemented in any way. The interface has been defined up to a - point and we have dummy implementations of the 'in-code' part ot the interface. This is the + point and we have dummy implementations of the 'in-code' part of the interface. This is the part, which is called throughout the code. The configuration API is defined but we don't even have a template implementation. However, this allows starting to use the SENF Logger in newly developed code. Even though this code will unconditionally log everything to \c std::cerr for @@ -131,9 +133,9 @@ namespace senf { This macro will write it's last argument to the log stream. The last argument must be an expression which will be placed after a streaming \c operator<< (like - some-log-sttream \c << last-macro-arg). + some-log-sttream \c << last-macro-arg). \code - BOOST_LOG((parameters...)("log message " << args << ...)); + SENF_LOG((parameters...)("log message " << args << ...)); \endcode \hideinitializer @@ -147,7 +149,7 @@ namespace senf { This macro is like SENF_LOG, however instead of writing a simple message, this macro allows to specify a complete block of code to be executed if the log message is enabled. \code - BOOST_LOG_BLOCK((parameters...)({ + SENF_LOG_BLOCK((parameters...)({ // arbitrary code using 'log' for logging log << "log message"; })); @@ -166,7 +168,7 @@ namespace senf { Sets the default log parameters for the current scope \code - BOOST_LOG_DEFAULTS((parameters...)); + SENF_LOG_DEFAULTS((parameters...)); \endcode \hideinitializer @@ -216,4 +218,6 @@ namespace senf { // c-file-style: "senf" // indent-tabs-mode: nil // ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 // End: