Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
81c00c70
Unverified
Commit
81c00c70
authored
Nov 14, 2020
by
Noir
Committed by
GitHub
Nov 14, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1161
Fix handling of excluded-components settings
parents
9cfd7902
375f9b9d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
5 deletions
+11
-5
CHANGELOG.md
CHANGELOG.md
+6
-0
libcaf_core/caf/logger.hpp
libcaf_core/caf/logger.hpp
+2
-2
libcaf_core/src/logger.cpp
libcaf_core/src/logger.cpp
+3
-3
No files found.
CHANGELOG.md
View file @
81c00c70
...
...
@@ -40,6 +40,12 @@ is based on [Keep a Changelog](https://keepachangelog.com).
dependency for
`caf_core`
to libatomic gets executables to compile and link as
expected (#1153).
-
Fixed a regression for remote groups introduced in 0.18.0-rc.1 (#1157).
-
CAF 0.18 introduced the option to set different
`excluded-components`
filters
for file and console log output. However, CAF rejected all events that matched
either filter. The new implementation uses the
*intersection*
of both filters
to reject log messages immediately (before enqueueing it to the logger's
queue) and then applies the filters individually when generating file or
console output.
## [0.18.0-rc.1] - 2020-09-09
...
...
libcaf_core/caf/logger.hpp
View file @
81c00c70
...
...
@@ -340,8 +340,8 @@ private:
// Configures verbosity and output generation.
config
cfg_
;
// Filters events by component name before enqueuing a log event.
Union of
// file_filter_ and console_filter_ if both outputs are enabled.
// Filters events by component name before enqueuing a log event.
Intersection
//
of
file_filter_ and console_filter_ if both outputs are enabled.
std
::
vector
<
std
::
string
>
global_filter_
;
// Filters events by component name for file output.
...
...
libcaf_core/src/logger.cpp
View file @
81c00c70
...
...
@@ -324,9 +324,9 @@ void logger::init(actor_system_config& cfg) {
read_filter
(
console_filter_
,
"caf.logger.console.excluded-components"
);
std
::
sort
(
file_filter_
.
begin
(),
file_filter_
.
end
());
std
::
sort
(
console_filter_
.
begin
(),
console_filter_
.
end
());
std
::
set_
un
ion
(
file_filter_
.
begin
(),
file_filter_
.
end
(),
console_filter_
.
begin
(),
console_filter_
.
end
(),
std
::
back_inserter
(
global_filter_
));
std
::
set_
intersect
ion
(
file_filter_
.
begin
(),
file_filter_
.
end
(),
console_filter_
.
begin
(),
console_filter_
.
end
(),
std
::
back_inserter
(
global_filter_
));
}
else
if
(
cfg_
.
file_verbosity
>
CAF_LOG_LEVEL_QUIET
)
{
read_filter
(
file_filter_
,
"caf.logger.file.excluded-components"
);
global_filter_
=
file_filter_
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment