|
Lunchbox
1.9.1
|
The logging class. More...
#include <log.h>
Inheritance diagram for lunchbox::Log:
Collaboration diagram for lunchbox::Log:Public Member Functions | |
| LUNCHBOX_API void | indent () |
| Indent subsequent log output by one level. More... | |
| LUNCHBOX_API void | exdent () |
| Un-indent subsequent log output by one level. More... | |
| LUNCHBOX_API void | disableFlush () |
| Disable flushing of the log on endl. More... | |
| LUNCHBOX_API void | enableFlush () |
| Re-enable flushing of the log on endl. More... | |
| LUNCHBOX_API void | forceFlush () |
| Flush all buffered log data. More... | |
| LUNCHBOX_API void | disableHeader () |
| Disable prefix printing for subsequent new lines. More... | |
| LUNCHBOX_API void | enableHeader () |
| Re-enable prefix printing for subsequent new lines. More... | |
| LUNCHBOX_API void | setThreadName (const std::string &name) |
| LUNCHBOX_API const std::string & | getThreadName () const |
Static Public Member Functions | |
| static LUNCHBOX_API Log & | instance () |
| The per-thread logger. More... | |
| static LUNCHBOX_API Log & | instance (const char *file, const int line) |
| The per-thread logger. More... | |
| static LUNCHBOX_API void | exit () |
| Exit the log instance for the current thread. More... | |
| static LUNCHBOX_API void | reset () |
| static std::string & | getLogLevelString () |
| The string representation of the current log level. More... | |
| static LUNCHBOX_API int | getLogLevel (const char *level) |
| static LUNCHBOX_API void | setOutput (std::ostream &stream) |
| Change the output stream. More... | |
| static LUNCHBOX_API bool | setOutput (const std::string &file) |
| Change the output stream to the given file. More... | |
| static LUNCHBOX_API std::ostream & | getOutput () |
| Get the current output stream. | |
| static LUNCHBOX_API void | setClock (Clock *clock) |
| Set the reference clock. More... | |
| static const Clock & | getClock () |
Static Public Attributes | |
| static LUNCHBOX_API int | level |
| The current log level. More... | |
| static LUNCHBOX_API unsigned | topics |
| The current log topics. More... | |
Friends | |
| template<class T > | |
| void | perThreadDelete (T *) |
| Default PerThread destructor deleting the object. More... | |
The logging class.
Should be accessed through the LBVERB, LBINFO, LBWARN, LBERROR and LBLOG macros, which manage per-thread instances and their invocation state.
| LUNCHBOX_API void lunchbox::Log::disableFlush | ( | ) |
Disable flushing of the log on endl.
| LUNCHBOX_API void lunchbox::Log::disableHeader | ( | ) |
Disable prefix printing for subsequent new lines.
| LUNCHBOX_API void lunchbox::Log::enableFlush | ( | ) |
Re-enable flushing of the log on endl.
| LUNCHBOX_API void lunchbox::Log::enableHeader | ( | ) |
Re-enable prefix printing for subsequent new lines.
| LUNCHBOX_API void lunchbox::Log::exdent | ( | ) |
Un-indent subsequent log output by one level.
|
static |
Exit the log instance for the current thread.
| LUNCHBOX_API void lunchbox::Log::forceFlush | ( | ) |
Flush all buffered log data.
|
static |
|
static |
The string representation of the current log level.
| LUNCHBOX_API void lunchbox::Log::indent | ( | ) |
Indent subsequent log output by one level.
|
static |
The per-thread logger.
Referenced by lunchbox::Referenced::ref().
Here is the caller graph for this function:
|
static |
The per-thread logger.
|
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.
| clock | the reference clock. |
|
static |
Change the output stream.
|
static |
Change the output stream to the given file.
|
friend |
Default PerThread destructor deleting the object.
Definition at line 29 of file perThread.h.
|
static |
|
static |