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
eae5dcd3
Commit
eae5dcd3
authored
Jan 23, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'issue/1024'
parents
7fdb1d39
a92ef813
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
4 deletions
+24
-4
libcaf_core/caf/logger.hpp
libcaf_core/caf/logger.hpp
+4
-2
libcaf_core/src/defaults.cpp
libcaf_core/src/defaults.cpp
+20
-2
No files found.
libcaf_core/caf/logger.hpp
View file @
eae5dcd3
...
...
@@ -498,8 +498,10 @@ bool operator==(const logger::field& x, const logger::field& y);
CAF_LOG_IMPL(CAF_LOG_COMPONENT, CAF_LOG_LEVEL_WARNING, output)
#endif
#define CAF_LOG_ERROR(output) \
CAF_LOG_IMPL(CAF_LOG_COMPONENT, CAF_LOG_LEVEL_ERROR, output)
#if CAF_LOG_LEVEL >= CAF_LOG_LEVEL_ERROR
# define CAF_LOG_ERROR(output) \
CAF_LOG_IMPL(CAF_LOG_COMPONENT, CAF_LOG_LEVEL_ERROR, output)
#endif
#ifndef CAF_LOG_INFO
# define CAF_LOG_INFO(output) CAF_VOID_STMT
...
...
libcaf_core/src/defaults.cpp
View file @
eae5dcd3
...
...
@@ -23,11 +23,29 @@
#include <limits>
#include <thread>
#include "caf/detail/build_config.hpp"
#include "caf/detail/log_level.hpp"
using
std
::
max
;
using
std
::
min
;
namespace
{
static
constexpr
caf
::
atom_value
default_log_level
=
#if CAF_LOG_LEVEL == CAF_LOG_LEVEL_TRACE
caf
::
atom
(
"trace"
);
#elif CAF_LOG_LEVEL == CAF_LOG_LEVEL_DEBUG
caf
::
atom
(
"debug"
);
#elif CAF_LOG_LEVEL == CAF_LOG_LEVEL_INFO
caf
::
atom
(
"info"
);
#elif CAF_LOG_LEVEL == CAF_LOG_LEVEL_WARNING
caf
::
atom
(
"warning"
);
#elif CAF_LOG_LEVEL == CAF_LOG_LEVEL_ERROR
caf
::
atom
(
"error"
);
#else
caf
::
atom
(
"quiet"
);
#endif
using
us_t
=
std
::
chrono
::
microseconds
;
constexpr
caf
::
timespan
us
(
us_t
::
rep
x
)
{
...
...
@@ -80,10 +98,10 @@ namespace logger {
string_view
component_filter
=
""
;
const
atom_value
console
=
atom
(
"none"
);
string_view
console_format
=
"%m"
;
const
atom_value
console_verbosity
=
atom
(
"trace"
)
;
const
atom_value
console_verbosity
=
default_log_level
;
string_view
file_format
=
"%r %c %p %a %t %C %M %F:%L %m%n"
;
string_view
file_name
=
"actor_log_[PID]_[TIMESTAMP]_[NODE].log"
;
const
atom_value
file_verbosity
=
atom
(
"trace"
)
;
const
atom_value
file_verbosity
=
default_log_level
;
}
// namespace logger
...
...
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