|
template<class... Ts> |
static void | log (unsigned level, std::string_view component, format_string_with_location fmt_str, Ts &&... args) |
| Logs a message.
|
|
template<class... Ts> |
static entrypoint | log (unsigned level, std::string_view component, detail::source_location loc=detail::source_location::current()) |
| Starts a new log event.
|
|
template<class... Ts> |
static trace_exit_guard | trace (std::string_view component, format_string_with_location fmt_str, Ts &&... args) |
| Logs a message with trace severity.
|
|
static actor_id | thread_local_aid () |
| Returns the ID of the actor currently associated to the calling thread.
|
|
static actor_id | thread_local_aid (actor_id aid) noexcept |
| Associates an actor ID to the calling thread and returns the last value.
|
|
static intrusive_ptr< logger > | make (actor_system &sys) |
| Creates a new logger instance.
|
|
static void | set_current_actor_system () |
|
static logger * | current_logger () |
| Returns the logger for the current thread or nullptr if none is registered.
|
|
static void | current_logger (actor_system *sys) |
| Sets the logger for the current thread.
|
|
static void | current_logger (logger *ptr) |
| Sets the logger for the current thread.
|
|
static void | current_logger (std::nullptr_t) |
| Sets the logger for the current thread.
|
|
Centrally logs events from all actors in an actor system.
To enable logging in your application, you need to define CAF_LOG_LEVEL
. Per default, the logger generates log4j compatible output.