Carna
Version 3.3.2
|
Records log messages. The log writing is delegated to implementations of the Log::Writer interface. The default writer is an instance from Log::StdWriter class. More...
#include <Log.h>
Classes | |
class | OnShutdownListener |
Defines callback interface that is invoked when the Log system is about to shut down. More... | |
class | StdWriter |
Writes fatal and error classified log messages to std::cerr and such classified as warning or debug to std::cout . More... | |
struct | TagScope |
Enforces the log to use a specific tag for the duration of the existence of the object from this class. The CARNA_LOG_TAG_SCOPE macro is provided for convenience. More... | |
class | TextWriter |
Abstract implementation of the Writer interface, that formats log messages along with their severity as pure ASCII character chains. More... | |
class | Writer |
Writes log entries. More... | |
Public Types | |
enum | Severity { fatal, error, warning, debug, verbose } |
Describes the severity of a log entry. More... | |
![]() | |
typedef Log | Instance |
Denotes the class, that is derived from this class template. | |
Public Member Functions | |
virtual | ~Log () |
Deletes. Notifies its shutdown listeners if they haven't been notified yet. | |
const std::string & | tag () const |
Tells current log tag. | |
void | setWriter (Writer *) |
Sets object that log writing will be delegated to. | |
void | record (Severity severity, const std::string &entry) const |
Instructs current writer to write entry with severity. | |
void | addOnShutdownListener (OnShutdownListener &listener) |
Makes listener be notified when the log system is about to shut down. | |
void | removeOnShutdownListener (const OnShutdownListener &listener) |
Makes listener no longer be notified when the log system is about to shut down. | |
void | shutdown () |
Notifies the shutdown listeners that the log system is about to shut down, if they haven't been notified yet. Usually there should be no necessity to call this method, unless the current writer is becoming invalid. No further messages will be logged. | |
![]() | |
virtual | ~Singleton () |
Denotes that the instance was deleted. | |
Protected Member Functions | |
Log () | |
Instantiates. | |
![]() | |
Singleton () | |
Denotes that the instance was created. Default constructor is hidden. | |
Friends | |
class | Singleton< Log > |
Additional Inherited Members | |
![]() | |
static Log & | instance () |
Returns the only instance from class InstanceType. | |
static bool | exists () |
Tells whether the instance from class InstanceType currently exists. | |
![]() | |
static void | reset () |
Deletes the only instance from class InstanceType. | |
Records log messages. The log writing is delegated to implementations of the Log::Writer interface. The default writer is an instance from Log::StdWriter class.
Describes the severity of a log entry.
Documentation generated by Doxygen