|
mod_servlet
C++Servlets
|
Logger class. More...
#include <logger.h>
Public Member Functions | |
| const std::string & | name () const |
| Returns name of this logger. More... | |
| level_logger | critical () |
Creates new level_logger with logging level LEVEL::CRITICAL More... | |
| level_logger | error () |
Creates new level_logger with logging level LEVEL::ERROR More... | |
| level_logger | warning () |
Creates new level_logger with logging level LEVEL::WARNING More... | |
| level_logger | info () |
Creates new level_logger with logging level LEVEL::INFO More... | |
| level_logger | config () |
Creates new level_logger with logging level LEVEL::CONFIG More... | |
| level_logger | debug () |
Creates new level_logger with logging level LEVEL::DEBUG More... | |
| level_logger | trace () |
Creates new level_logger with logging level LEVEL::TRACE More... | |
| level_logger | log (LEVEL level) |
| Creates new level_logger with a provided logging level. More... | |
| bool | is_loggable (LEVEL level) const |
| Tests if the requested level is loggable. More... | |
| void | set_log_level (LEVEL log_level) |
| Sets new new minimum logging level for this logger. More... | |
| void | set_prefix_printer (std::shared_ptr< prefix_printer > new_pp) |
Sets new prefix_printer for this logger. More... | |
| void | set_log_output (log_output *new_out, SYNC_POLICY policy=SYNC_POLICY::SYNC) |
Sets new log_output for this logger. More... | |
| void | imbue (const std::locale &loc) |
| Imbue locale. More... | |
Friends | |
| class | level_logger |
| class | log_registry |
Logger class.
Every logger can have the following attributes:
name - name of the logger. locale - locale which is used for the log output stream associated with this logger level - logging level for this logger prefix_printer - prefix printer to use with this logger log_output - log output to which this logger will send its messages All this attributes (except name) can be changed.
|
inline |
Creates new level_logger with logging level LEVEL::CONFIG
|
inline |
Creates new level_logger with logging level LEVEL::CRITICAL
|
inline |
Creates new level_logger with logging level LEVEL::DEBUG
|
inline |
Creates new level_logger with logging level LEVEL::ERROR
|
inline |
Imbue locale.
Associates loc to this logger as the new locale object to be used with locale-sensitive operations.
| loc | New locale for the logger. |
|
inline |
Creates new level_logger with logging level LEVEL::INFO
|
inline |
Tests if the requested level is loggable.
| level | Logging level to test for loggability |
true if a given level is loggable, false otherwise.
|
inline |
Creates new level_logger with a provided logging level.
|
inline |
Returns name of this logger.
|
inline |
Sets new new minimum logging level for this logger.
Only log messages with loggin level higher than log_level will be logged. The rest messages will be discarded.
| log_level | New logging level for this logger. |
| void servlet::logging::logger::set_log_output | ( | log_output * | new_out, |
| SYNC_POLICY | policy = SYNC_POLICY::SYNC |
||
| ) |
Sets new log_output for this logger.
| new_out | New log_output to be used with this logger. |
| policy | Synchronization policy to be assumed by this logger. |
|
inline |
Sets new prefix_printer for this logger.
| new_pp | new prefix_printer to be used by this logger |
|
inline |
Creates new level_logger with logging level LEVEL::TRACE
|
inline |
Creates new level_logger with logging level LEVEL::WARNING