This is logging interface for the library. It is purely static, i.e., a singleton class.
Definition at line 304 of file osblog.h.
OSB_LIB::Log::Log | ( | ) | [private] |
Prevent construction: not implemented.
LogBase & OSB_LIB::Log::cont | ( | ) | [inline, static] |
Continue a log message.
This is typically used when logging must be done over loop or when a conditional is involved:
Log::info() << "Version information" << Log::nl; for (int i = 0; i < vsinfo.size(); ++i) { Log::cont() << "File: " << vsinfo[i].file_ << Log::nl; if (!vsinfo[i].name_.empty()) { Log::cont() << "Name: " << vsinfo[i].name_ << Log::nl; } Log::cont() << "Version: " << vsinfo[i].version_ << Log::nl; } Log::endlog();
Definition at line 538 of file osblog.h.
References instance().
Referenced by empty().
LogBase & OSB_LIB::Log::debug | ( | int | level = 1 |
) | [inline, static] |
Start a debugging message.
level | See LogBase::debug for a description. |
Definition at line 533 of file osblog.h.
References OSB_LIB::LogBase::debug(), and instance().
void OSB_LIB::Log::elog | ( | LogBase & | log | ) | [inline, static] |
Manipulator: end a log message with a new-line.
Definition at line 562 of file osblog.h.
References OSB_LIB::LogBase::elog().
void OSB_LIB::Log::empty | ( | int | level, | |
int | lines = 1 | |||
) | [inline, static] |
void OSB_LIB::Log::endlog | ( | LogBase & | log | ) | [inline, static] |
Manipulator: end a log message without a new-line.
Definition at line 567 of file osblog.h.
References OSB_LIB::LogBase::endlog().
void OSB_LIB::Log::endlog | ( | ) | [inline, static] |
Terminate a log message without a new-line.
See cont() for an example.
Definition at line 543 of file osblog.h.
References OSB_LIB::LogBase::endlog(), and instance().
Referenced by empty().
LogBase & OSB_LIB::Log::error | ( | ) | [inline, static] |
Start an error message.
Definition at line 513 of file osblog.h.
References OSB_LIB::LogBase::error(), and instance().
LogBase & OSB_LIB::Log::fatal | ( | ) | [inline, static] |
Start a fatal error message.
Definition at line 508 of file osblog.h.
References OSB_LIB::LogBase::fatal(), and instance().
const LogBase::HeadFiller OSB_LIB::Log::head | ( | char | filler = ' ' |
) | [inline, static] |
LogBase & OSB_LIB::Log::info | ( | ) | [inline, static] |
Start a normal message.
Definition at line 523 of file osblog.h.
References OSB_LIB::LogBase::info(), and instance().
static LogBase& OSB_LIB::Log::instance | ( | ) | [static, private] |
Get the logging instance.
Referenced by cont(), debug(), endlog(), error(), fatal(), info(), logLevel(), raw(), setLevel(), setVerbose(), verbose(), and warn().
int OSB_LIB::Log::logLevel | ( | ) | [inline, static] |
Get the current log level.
Definition at line 579 of file osblog.h.
References instance(), and OSB_LIB::LogBase::logLevel().
Manipulator: start a new line.
Definition at line 557 of file osblog.h.
References OSB_LIB::LogBase::nl().
LogBase & OSB_LIB::Log::raw | ( | int | level = 4 |
) | [inline, static] |
Start a message without standard header.
level | Logging level of the message: 1: fatal 2: error 3: warn 4: info 5+: debug |
Definition at line 528 of file osblog.h.
References instance(), and OSB_LIB::LogBase::raw().
Referenced by empty().
Set the logging class, taking ownership.
instance | Auto-pointer to an object of the logging implementation. |
Set the logging class.
instance | Pointer to an object of the logging implementation. |
void OSB_LIB::Log::setLevel | ( | int | logLevel | ) | [inline, static] |
Set the log level.
logLevel | New log level to be used. |
Definition at line 584 of file osblog.h.
References instance(), and OSB_LIB::LogBase::setLevel().
void OSB_LIB::Log::setVerbose | ( | bool | on | ) | [inline, static] |
Set verbose flag.
Definition at line 594 of file osblog.h.
References instance(), and OSB_LIB::LogBase::setVerbose().
bool OSB_LIB::Log::verbose | ( | ) | [inline, static] |
Verbose (duplicate) messages on slog()?
Definition at line 589 of file osblog.h.
References instance(), and OSB_LIB::LogBase::verbose().
LogBase & OSB_LIB::Log::warn | ( | ) | [inline, static] |
Start an warning.
Definition at line 518 of file osblog.h.
References instance(), and OSB_LIB::LogBase::warn().
LogBase* OSB_LIB::Log::instance_ [static, private] |
bool OSB_LIB::Log::ownsInstance_ [static, private] |