|
FougTools
0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
|
Provides an easy-to-use output stream for logging. More...
#include <qttools/core/log.h>
Public Types | |
| enum | MessageType { DebugMessage, InfoMessage, WarningMessage, CriticalMessage, FatalMessage } |
| Types of logging message, with increasing severity. More... | |
Public Member Functions | |
| Log () | |
| Construct a null Log stream, ie. it won't print anything. More... | |
| Log (MessageType msgType) | |
| Construct a Log stream for messages of a special type. More... | |
| Log (const Log &other) | |
Construct a copy of the other Log stream. More... | |
| ~Log () | |
| Flush any pending data to be written and destroys the Log stream. More... | |
| Log & | space () |
| Write a space character to the Log stream and return a reference to the stream. More... | |
| Log & | operator<< (bool) |
Write the boolean t to the log stream and return a reference to the stream. More... | |
| Log & | operator<< (char) |
| Log & | operator<< (short) |
| Log & | operator<< (unsigned short) |
| Log & | operator<< (int) |
| Log & | operator<< (unsigned int) |
| Log & | operator<< (long) |
| Log & | operator<< (unsigned long) |
| Log & | operator<< (qlonglong) |
| Log & | operator<< (qulonglong) |
| Log & | operator<< (float) |
| Log & | operator<< (double) |
| Log & | operator<< (const char *) |
| Log & | operator<< (const QString &) |
| template<typename T > | |
| Log & | operator<< (const T *ptr) |
Static Public Member Functions | |
| static void | registerMetaTypes () |
Related Functions | |
(Note that these are not member functions.) | |
| Log | debugLog () |
| Log | infoLog () |
| Log | warningLog () |
| Log | criticalLog () |
| Log | fatalLog () |
| void | attachGlobalLogHandler (AbstractLogHandler *handler) |
Append handler to the global list of log handlers. More... | |
| void | detachGlobalLogHandler (AbstractLogHandler *handler) |
Remove handler from the global list of log handlers. More... | |
Provides an easy-to-use output stream for logging.
This class is almost a clone of QDebug, but it's focused on logging.
Also the way messages are handled is different as there can be multiple logging handlers attached (not just one).
| qtcore::Log::Log | ( | ) |
Construct a null Log stream, ie. it won't print anything.
| qtcore::Log::Log | ( | MessageType | msgType | ) |
Construct a Log stream for messages of a special type.
| qtcore::Log::~Log | ( | ) |
Flush any pending data to be written and destroys the Log stream.
| Log & qtcore::Log::operator<< | ( | bool | t | ) |
Write the boolean t to the log stream and return a reference to the stream.
| Log & qtcore::Log::operator<< | ( | char | t | ) |
| Log & qtcore::Log::operator<< | ( | short | t | ) |
| Log & qtcore::Log::operator<< | ( | unsigned short | t | ) |
| Log & qtcore::Log::operator<< | ( | int | t | ) |
| Log & qtcore::Log::operator<< | ( | unsigned int | t | ) |
| Log & qtcore::Log::operator<< | ( | long | t | ) |
| Log & qtcore::Log::operator<< | ( | unsigned long | t | ) |
| Log & qtcore::Log::operator<< | ( | qlonglong | t | ) |
| Log & qtcore::Log::operator<< | ( | qulonglong | t | ) |
| Log & qtcore::Log::operator<< | ( | float | t | ) |
| Log & qtcore::Log::operator<< | ( | double | t | ) |
| Log & qtcore::Log::operator<< | ( | const char * | str | ) |
| Log & qtcore::Log::operator<< | ( | const QString & | str | ) |
| Log & qtcore::Log::operator<< | ( | const T * | ptr | ) |
|
static |
| Log & qtcore::Log::space | ( | ) |
Write a space character to the Log stream and return a reference to the stream.
|
related |
Append handler to the global list of log handlers.
If the internal list of log handlers is empty then all pending log messages are flushed to handler.
Note that log messages are recorded when there is no log handler attached. In this case a log message is considered as "pending".
|
related |
|
related |
|
related |
Remove handler from the global list of log handlers.
|
related |
|
related |
|
related |
1.8.8