Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
osv
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Verlässliche Systemsoftware
projects
osv
Commits
934839fe
Commit
934839fe
authored
12 years ago
by
Guy Zana
Browse files
Options
Downloads
Patches
Plain Diff
Added documentation for the logger
parent
7c9e3b89
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
documentation/logger.txt
+36
-0
36 additions, 0 deletions
documentation/logger.txt
with
36 additions
and
0 deletions
documentation/logger.txt
0 → 100644
+
36
−
0
View file @
934839fe
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"));
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment