#include <logging.h>
Static Public Member Functions | |
template<class WritePolicy_, int Sev_, int Aud_, class ParamList_> | |
static void | write_msg (TEMPLOG_SOURCE_SIGN, const ParamList_ ¶meters) |
Static Protected Member Functions | |
template<class WritePolicy_, class WriteToken_, typename T> | |
static void | write_obj (WriteToken_ &token, const T &obj) |
template<class WritePolicy_, class WriteToken_, class Param_, class ParamList_> | |
static void | write_params (WriteToken_ &token, const templ_meta::tuple< const Param_ *, ParamList_ > ¶meters) |
Formatting policies describe how log messages are to be written. In order to achieve maximum performance (by exploring compile-time decisions and heavily inlined code) formatting policies have to tightly work together with write policies.
There already are a few pre-defined formatting policies. If you want to write your own, this class provides all the boiler-plate for writing arbitrary objects as well as all of the log statement's parameters in collaboration with the write policy.
If you want to use this code, derive from this class, passing the derived class' type as a template parameter. In your derived class implement a function with this template< class WritePolicy_, int Sev_, int Aud_, class WriteToken_, class ParamList_ > static void write(WriteToken_& token, TEMPLOG_SOURCE_SIGN, const ParamList_& parameters); signature which uses the base class' write_obj() and write_params() functions in order to write a formatted log message to an arbitrary sink.
Definition at line 411 of file logging.h.
|
Writes a log message using the derived class' write() function. |
|
Calls this from derived classes in order to write arbitrary objects.
|
|
Call this from derived classes in order to write a parameter list. |