#include <SQLiteLogOutput.h>
Static Public Member Functions | |
static LogOutputStream * | create (const icl_core::String &name, const icl_core::String &config_prefix, icl_core::logging::LogLevel log_level=cDEFAULT_LOG_LEVEL) |
Private Member Functions | |
virtual void | onShutdown () |
virtual void | onStart () |
virtual void | pushImpl (const LogMessage &log_message) |
SQLiteLogOutput (const icl_core::String &name, const icl_core::String &config_prefix, icl_core::logging::LogLevel log_level) | |
virtual | ~SQLiteLogOutput () |
Private Attributes | |
SQLiteLogDb * | m_db |
An output stream which writes log messages to a SQLite database.
This class is implemented as a singleton so that only one instance can exist in any process.
Definition at line 42 of file SQLiteLogOutput.h.
icl_core::logging::SQLiteLogOutput::SQLiteLogOutput | ( | const icl_core::String & | name, |
const icl_core::String & | config_prefix, | ||
icl_core::logging::LogLevel | log_level | ||
) | [private] |
Definition at line 41 of file SQLiteLogOutput.cpp.
icl_core::logging::SQLiteLogOutput::~SQLiteLogOutput | ( | ) | [private, virtual] |
Definition at line 59 of file SQLiteLogOutput.cpp.
LogOutputStream * icl_core::logging::SQLiteLogOutput::create | ( | const icl_core::String & | name, |
const icl_core::String & | config_prefix, | ||
icl_core::logging::LogLevel | log_level = cDEFAULT_LOG_LEVEL |
||
) | [static] |
Creates a new SQLite log output stream object.
Definition at line 35 of file SQLiteLogOutput.cpp.
void icl_core::logging::SQLiteLogOutput::onShutdown | ( | ) | [private, virtual] |
This virtual function is called from the worker thread just before it ends execution. It can be used by output stream implementations to do cleanup work, which has to be performed in the worker thread.
Reimplemented from icl_core::logging::LogOutputStream.
Definition at line 78 of file SQLiteLogOutput.cpp.
void icl_core::logging::SQLiteLogOutput::onStart | ( | ) | [private, virtual] |
This virtual function is called from the worker thread just after it has been started. It can be used by output stream implementations to do initializations, which have to be performed in the worker thread.
Reimplemented from icl_core::logging::LogOutputStream.
Definition at line 65 of file SQLiteLogOutput.cpp.
void icl_core::logging::SQLiteLogOutput::pushImpl | ( | const LogMessage & | log_message | ) | [private, virtual] |
This virtual function is called with an unformatted log message. It can be overridden by output streams, which need to process the individual fields of a log message.
The default implementation formats the log message according to the configured message format and calls pushImpl(const char*) for further processing.
Reimplemented from icl_core::logging::LogOutputStream.
Definition at line 70 of file SQLiteLogOutput.cpp.
Definition at line 61 of file SQLiteLogOutput.h.