Opened 8 years ago
Closed 8 years ago
#10242 closed Bugs (invalid)
logging::core::set_filter() prevents attributes from being removed and added
Reported by: | Owned by: | Andrey Semashev | |
---|---|---|---|
Milestone: | To Be Determined | Component: | log |
Version: | Boost 1.55.0 | Severity: | Problem |
Keywords: | set_filter remove_all_attributes | Cc: |
Description
I have attached a simplified repro case.
Setting a filter on the core will affect how attributes are removed an added from logger objects.
If the filter is set, removing and then adding attributes will fail on a logger object.
If no filter is set, removing and adding attributes works as expected.
Attachments (1)
Change History (2)
by , 8 years ago
Attachment: | boostLogger.cpp added |
---|
comment:1 by , 8 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
This is not a bug. When you call remove_all_attributes on the logger the first time you also remove the severity attribute from the logger. This doesn't matter when the filter is not set since in that case severity is not used anywhere. But when the filter is set, it doesn't find the severity in the second and third log records and returns false which results in discarding these records.
Notice the comments tagged with BUG