||11 months ago|
|html||11 months ago|
|src||11 months ago|
|.gitignore||2 years ago|
|COPYING||5 years ago|
|README.md||11 months ago|
The p≡p Logger is a fork of the Logger module of the p≡p JSON Server Adapter.
compile-time configurable via
logger_config.hh, run-time configuable via API functions
supports logging to syslog (UN*X only), to a file and to the console (stderr).
supports log levels ("severities" in syslog terminology) and run-time filtering of log entries lower than given "log level"
API for both printf()-like ("C") style and C++ outputstream-like style
compile-time disabling of debug messages via
-D DEBUG_ENABLED(if done via macros, see below)
hierarchical Logger instances that inherit their "name" and their log level from their parent Logger instance
multi-line log messages, visualized via big square brackets
auto wrapping of long log lines, visualized via "↩" and "↪" (configurable at run-time via
log GMT / UTC timestamp and easily greppable thread IDs. The thread IDh have the form
¶XYZwhere 'XYZ' is a hash of
std::this_thread::get_id(), truncated to three base-37 digits, to make collisions of thread IDs unlikely.
truncating of pathologically long log messages, visualized via "▒ (%u octets clipped)" (configurable at run-time via
escaping of non-printing control characters, illegal Unicode codepoints and illegal UTF-8 sequences
- C++14 compiler: tested with clang++ 10, g++ 11. Newer versions should work, too.
- GNU make
Building/Installing (Linux and macOS)
It is so simple. This should do out of the box:
Using the Logger in your own code
See examples in