The logging class.
More...
#include <log.h>
Public Member Functions |
void | indent () |
void | exdent () |
void | disableFlush () |
void | enableFlush () |
void | forceFlush () |
void | disableHeader () |
void | enableHeader () |
void | setThreadName (const std::string &name) |
const char * | getThreadName () const |
Static Public Member Functions |
static Log & | instance () |
| The per-thread logger.
|
static Log & | instance (const char *file, const int line) |
| The per-thread logger.
|
static void | exit () |
| Exit the log instance for the current thread.
|
static void | reset () |
static std::string & | getLogLevelString () |
| The string representation of the current log level.
|
static int | getLogLevel (const char *level) |
static void | setOutput (std::ostream &stream) |
| Change the output stream.
|
static bool | setOutput (const std::string &file) |
| Change the output stream to the given file.
|
static std::ostream & | getOutput () |
| Get the current output stream.
|
static void | setClock (Clock *clock) |
| Set the reference clock.
|
static const Clock & | getClock () |
Static Public Attributes |
static int | level |
| The current log level.
|
static unsigned | topics |
| The current log topics.
|
Detailed Description
The logging class.
Definition at line 133 of file log.h.
Member Function Documentation
static void lunchbox::Log::exit |
( |
| ) |
|
|
static |
Exit the log instance for the current thread.
static int lunchbox::Log::getLogLevel |
( |
const char * |
level | ) |
|
|
static |
- Returns
- the log level of a string representation.
- Version
- 1.3.2
static std::string& lunchbox::Log::getLogLevelString |
( |
| ) |
|
|
static |
The string representation of the current log level.
static Log& lunchbox::Log::instance |
( |
| ) |
|
|
static |
static Log& lunchbox::Log::instance |
( |
const char * |
file, |
|
|
const int |
line |
|
) |
| |
|
static |
static void lunchbox::Log::setClock |
( |
Clock * |
clock | ) |
|
|
static |
Set the reference clock.
The clock will be used instantly by all log outputs. Use 0 to reset the clock to the default clock.
- Parameters
-
clock | the reference clock. |
static void lunchbox::Log::setOutput |
( |
std::ostream & |
stream | ) |
|
|
static |
Change the output stream.
- Version
- 1.4
static bool lunchbox::Log::setOutput |
( |
const std::string & |
file | ) |
|
|
static |
Change the output stream to the given file.
- Version
- 1.5.1
Member Data Documentation
The current log level.
Definition at line 149 of file log.h.
unsigned lunchbox::Log::topics |
|
static |
The current log topics.
Definition at line 152 of file log.h.
The documentation for this class was generated from the following file: