11 | | {{{}}} |
| 11 | * Right inside the class definition of your {{{.h}}} class {{{TestClass}}} to use the following: {{{use_logging_h(TestClass)}}}. In the {{{.cpp}}} source file use {{{use_logging_cpp(TestClass)}}}. |
| 12 | |
| 13 | * The order of log-level is "debug", "info", "warning", "error". The default log-level is "info". |
| 14 | |
| 15 | * To change the default log-level you can use the functions |
| 16 | * {{{logging_rootlevel_debug();}}} |
| 17 | * {{{logging_rootlevel_info();}}} |
| 18 | * {{{logging_rootlevel_warn();}}} |
| 19 | * {{{logging_rootlevel_error();}}} |
| 20 | |
| 21 | * To change the individual log-level of a class you can e.g. first set the global level to "warn" and then for your test-class to "debug". This feature is only available when you have log4cxx installed |
| 22 | {{{ |
| 23 | logging_rootlevel_warn(); |
| 24 | logging_classlevel_debug("TestClass"); |
| 25 | }}} |
| 26 | |
| 27 | * The log-level functions for individual classes are |
| 28 | * {{{logging_classlevel_debug("TestClass")}}} |
| 29 | * {{{logging_classlevel_info("TestClass")}}} |
| 30 | * {{{logging_classlevel_warn("TestClass")}}} |
| 31 | * {{{logging_classlevel_error("TestClass")}}} |
| 32 | |
| 33 | * Finally, the functions to actually perform logging at the different levels are ("fatal" will kill the program) |
| 34 | * {{{logging_debug("this is a log message")}}} |
| 35 | * {{{logging_info("this is a log message")}}} |
| 36 | * {{{logging_warn("this is a log message")}}} |
| 37 | * {{{logging_error("this is a log message")}}} |
| 38 | * {{{logging_fatal("this is a log message")}}} |