libcaf  0.15.3
Public Member Functions | Static Public Member Functions | Friends | List of all members
caf::logger Class Reference

Centrally logs events from all actors in an actor system. More...

#include <logger.hpp>

Inheritance diagram for caf::logger:
caf::ref_counted caf::memory_managed

Public Member Functions

actor_id thread_local_aid ()
 Returns the ID of the actor currently associated to the calling thread.
 
actor_id thread_local_aid (actor_id aid)
 Associates an actor ID to the calling thread and returns the last value.
 
void log (int level, const char *component, const std::string &class_name, const char *function_name, const char *c_full_file_name, int line_num, const std::string &msg)
 Writes an entry to the log file.
 
- Public Member Functions inherited from caf::ref_counted
 ref_counted (const ref_counted &)
 
ref_countedoperator= (const ref_counted &)
 
void ref () noexcept
 Increases reference count by one.
 
void deref () noexcept
 Decreases reference count by one and calls request_deletion when it drops to zero. More...
 
bool unique () const noexcept
 Queries whether there is exactly one reference.
 
size_t get_reference_count () const noexcept
 
- Public Member Functions inherited from caf::memory_managed
virtual void request_deletion (bool decremented_rc) noexcept
 Default implementations calls `delete this, but can be overriden in case deletion depends on some condition or the class doesn't use default new/delete. More...
 

Static Public Member Functions

template<class T >
static arg_wrapper< T > make_arg_wrapper (const char *name, const T &value)
 
static std::string render_type_name (const std::type_info &ti)
 
static std::string extract_class_name (const char *prettyfun, size_t strsize)
 
template<size_t N>
static std::string extract_class_name (const char(&prettyfun)[N])
 

Friends

class actor_system
 

Additional Inherited Members

- Protected Attributes inherited from caf::ref_counted
std::atomic< size_t > rc_
 

Detailed Description

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.


The documentation for this class was generated from the following file: