Skip to content
Snippets Groups Projects
Commit 934839fe authored by Guy Zana's avatar Guy Zana
Browse files

Added documentation for the logger

parent 7c9e3b89
No related branches found
No related tags found
No related merge requests found
How it works:
=============
Whenever you want to log a message, you should specify a tag and severity,
for example "pci" and logger_error. The tag describes the module that is
responsible for the output.
Filtering of messages is done by configuring the logger on load time
(logger::instance()->parse_configuration), the configuration specifies the
threshold severity level per each tag.
Messages pass the filter only if their severity level is above or equal
what's configured.
Severities: debug, info, warn, error.
Please see pci.cc and pci.hh for usage example.
Notes:
======
1. If a tag is not configured, the default severity is used: logger_error.
2. suppressing messages - configure a tag with logger_none.
What's left to do:
==================
1. Wire sprintf
2. Configure line format (show time, show thread id, etc...)
3. Configure using a file (change parse_configuration())
Example:
========
- Log a message with the "pci" tag and debug severity:
logger::instance()->log("pci", logger::logger_debug, fmt("Message"));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment