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
eb2a9810
Commit
eb2a9810
authored
Jul 07, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug with setting log verbosity to quiet
parent
de5ab58f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
libcaf_core/caf/logger.hpp
libcaf_core/caf/logger.hpp
+1
-0
libcaf_core/src/logger.cpp
libcaf_core/src/logger.cpp
+6
-0
No files found.
libcaf_core/caf/logger.hpp
View file @
eb2a9810
...
@@ -297,6 +297,7 @@ bool operator==(const logger::field& x, const logger::field& y);
...
@@ -297,6 +297,7 @@ bool operator==(const logger::field& x, const logger::field& y);
#define CAF_CAT(a, b) a##b
#define CAF_CAT(a, b) a##b
#define CAF_LOG_LEVEL_QUIET -1
#define CAF_LOG_LEVEL_ERROR 0
#define CAF_LOG_LEVEL_ERROR 0
#define CAF_LOG_LEVEL_WARNING 1
#define CAF_LOG_LEVEL_WARNING 1
#define CAF_LOG_LEVEL_INFO 2
#define CAF_LOG_LEVEL_INFO 2
...
...
libcaf_core/src/logger.cpp
View file @
eb2a9810
...
@@ -188,6 +188,8 @@ bool logger::accepts(int level, const char* cname_begin,
...
@@ -188,6 +188,8 @@ bool logger::accepts(int level, const char* cname_begin,
const
char
*
cname_end
)
{
const
char
*
cname_end
)
{
CAF_ASSERT
(
cname_begin
!=
nullptr
&&
cname_end
!=
nullptr
);
CAF_ASSERT
(
cname_begin
!=
nullptr
&&
cname_end
!=
nullptr
);
CAF_ASSERT
(
level
>=
0
&&
level
<=
4
);
CAF_ASSERT
(
level
>=
0
&&
level
<=
4
);
if
(
level
>
level_
)
return
false
;
auto
&
filter
=
system_
.
config
().
logger_component_filter
;
auto
&
filter
=
system_
.
config
().
logger_component_filter
;
if
(
!
filter
.
empty
())
{
if
(
!
filter
.
empty
())
{
auto
it
=
std
::
search
(
filter
.
begin
(),
filter
.
end
(),
cname_begin
,
cname_end
);
auto
it
=
std
::
search
(
filter
.
begin
(),
filter
.
end
(),
cname_begin
,
cname_end
);
...
@@ -214,6 +216,10 @@ void logger::init(actor_system_config& cfg) {
...
@@ -214,6 +216,10 @@ void logger::init(actor_system_config& cfg) {
inline_output_
=
cfg
.
logger_inline_output
;
inline_output_
=
cfg
.
logger_inline_output
;
// Parse the configured log level.
// Parse the configured log level.
switch
(
static_cast
<
uint64_t
>
(
cfg
.
logger_verbosity
))
{
switch
(
static_cast
<
uint64_t
>
(
cfg
.
logger_verbosity
))
{
case
atom_uint
(
"quiet"
):
case
atom_uint
(
"QUIET"
):
level_
=
CAF_LOG_LEVEL_QUIET
;
break
;
case
atom_uint
(
"error"
):
case
atom_uint
(
"error"
):
case
atom_uint
(
"ERROR"
):
case
atom_uint
(
"ERROR"
):
level_
=
CAF_LOG_LEVEL_ERROR
;
level_
=
CAF_LOG_LEVEL_ERROR
;
...
...
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