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
774c65b8
Commit
774c65b8
authored
Dec 05, 2016
by
Matthias Vallentin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log SE-0001 events with separate component
parent
1ae10442
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
libcaf_core/caf/logger.hpp
libcaf_core/caf/logger.hpp
+12
-10
No files found.
libcaf_core/caf/logger.hpp
View file @
774c65b8
...
...
@@ -342,18 +342,20 @@ inline caf::actor_id caf_set_aid_dummy() { return 0; }
// -- Standardized CAF events according to SE-0001.
#define CAF_LOG_EVENT_COMPONENT "se-0001"
#define CAF_LOG_SPAWN_EVENT(aid, aargs) \
CAF_LOG_IMPL(CAF_
DEFAULT_LOG_COMPONENT, CAF_LOG_LEVEL_DEBUG,
\
CAF_LOG_IMPL(CAF_
LOG_EVENT_COMPONENT, CAF_LOG_LEVEL_DEBUG,
\
"SPAWN ; ID =" << aid \
<< "; ARGS =" << deep_to_string(aargs).c_str())
#define CAF_LOG_INIT_EVENT(aName, aHide) \
CAF_LOG_IMPL(CAF_
DEFAULT_LOG_COMPONENT, CAF_LOG_LEVEL_DEBUG,
\
CAF_LOG_IMPL(CAF_
LOG_EVENT_COMPONENT, CAF_LOG_LEVEL_DEBUG,
\
"INIT ; NAME =" << aName << "; HIDDEN =" << aHide)
/// Logs
#define CAF_LOG_SEND_EVENT(ptr) \
CAF_LOG_IMPL(CAF_
DEFAULT_LOG_COMPONENT, CAF_LOG_LEVEL_DEBUG,
\
CAF_LOG_IMPL(CAF_
LOG_EVENT_COMPONENT, CAF_LOG_LEVEL_DEBUG,
\
"SEND ; TO =" \
<< deep_to_string(strong_actor_ptr{this->ctrl()}).c_str() \
<< "; FROM =" << deep_to_string(ptr->sender).c_str() \
...
...
@@ -361,29 +363,29 @@ inline caf::actor_id caf_set_aid_dummy() { return 0; }
<< "; CONTENT =" << deep_to_string(ptr->content()).c_str())
#define CAF_LOG_RECEIVE_EVENT(ptr) \
CAF_LOG_IMPL(CAF_
DEFAULT_LOG_COMPONENT, CAF_LOG_LEVEL_DEBUG,
\
CAF_LOG_IMPL(CAF_
LOG_EVENT_COMPONENT, CAF_LOG_LEVEL_DEBUG,
\
"RECEIVE ; FROM =" \
<< deep_to_string(ptr->sender).c_str() \
<< "; STAGES =" << deep_to_string(ptr->stages).c_str() \
<< "; CONTENT =" << deep_to_string(ptr->content()).c_str())
#define CAF_LOG_REJECT_EVENT() \
CAF_LOG_IMPL(CAF_
DEFAULT_LOG
_COMPONENT, CAF_LOG_LEVEL_DEBUG, "REJECT")
CAF_LOG_IMPL(CAF_
LOG_EVENT
_COMPONENT, CAF_LOG_LEVEL_DEBUG, "REJECT")
#define CAF_LOG_ACCEPT_EVENT() \
CAF_LOG_IMPL(CAF_
DEFAULT_LOG
_COMPONENT, CAF_LOG_LEVEL_DEBUG, "ACCEPT")
CAF_LOG_IMPL(CAF_
LOG_EVENT
_COMPONENT, CAF_LOG_LEVEL_DEBUG, "ACCEPT")
#define CAF_LOG_DROP_EVENT() \
CAF_LOG_IMPL(CAF_
DEFAULT_LOG
_COMPONENT, CAF_LOG_LEVEL_DEBUG, "DROP")
CAF_LOG_IMPL(CAF_
LOG_EVENT
_COMPONENT, CAF_LOG_LEVEL_DEBUG, "DROP")
#define CAF_LOG_SKIP_EVENT() \
CAF_LOG_IMPL(CAF_
DEFAULT_LOG
_COMPONENT, CAF_LOG_LEVEL_DEBUG, "SKIP")
CAF_LOG_IMPL(CAF_
LOG_EVENT
_COMPONENT, CAF_LOG_LEVEL_DEBUG, "SKIP")
#define CAF_LOG_FINALIZE_EVENT() \
CAF_LOG_IMPL(CAF_
DEFAULT_LOG
_COMPONENT, CAF_LOG_LEVEL_DEBUG, "FINALIZE")
CAF_LOG_IMPL(CAF_
LOG_EVENT
_COMPONENT, CAF_LOG_LEVEL_DEBUG, "FINALIZE")
#define CAF_LOG_TERMINATE_EVENT(rsn) \
CAF_LOG_IMPL(CAF_
DEFAULT_LOG_COMPONENT, CAF_LOG_LEVEL_DEBUG,
\
CAF_LOG_IMPL(CAF_
LOG_EVENT_COMPONENT, CAF_LOG_LEVEL_DEBUG,
\
"TERMINATE ; REASON =" << deep_to_string(rsn).c_str())
#endif // CAF_LOGGER_HPP
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