#8840 closed Bugs (fixed)
Missing severity level string in log records
Reported by: | Owned by: | Andrey Semashev | |
---|---|---|---|
Milestone: | To Be Determined | Component: | log |
Version: | Boost 1.54.0 | Severity: | Problem |
Keywords: | Cc: |
Description
I have been trying to get some assistance on this issue from the Boost Users mailing list for more than a week but I have not had a reply that resolved the issue thus I have decided to log it as a bug.
The issue I am having is that the severity level string is not appearing in the log records generated from my test program.
I am attaching my complete test program, settings file and sample result file.
Attachments (3)
Change History (6)
by , 9 years ago
Attachment: | test_logging.cpp added |
---|
by , 9 years ago
Attachment: | test_logging_0.log added |
---|
The resulting log records from my test program
comment:1 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
You need to register your severity attribute in the library before parsing the settings file. See here. The attribute may have to be registered both for formatter and filter parsers, if you want to filter records based on severity level.
comment:2 by , 9 years ago
OK, this is working but I had to add a stream input/extraction function and then I had to add the following two lines before loading the settings from the settings file:
logging::register_simple_formatter_factory<ESeverityLevel, char>("Severity"); logging::register_simple_filter_factory<ESeverityLevel, char>("Severity");
comment:3 by , 6 years ago
It would be really great to put this note in the documentation when talking about the severity levels output and formats, there are people loosing like 2 days because it is not clear right away.
Contain my complete test program