kget
bt::Log Class Reference
#include <log.h>
Detailed Description
Class which writes messages to a logfile
This class writes messages to a logfile. To use it, create an instance, set the output file and write stuff with the << operator.
By default all messages will also be printed on the standard output. This can be turned down using the setOutputToConsole function.
There is also the possibility to monitor what is written to the log using the LogMonitorInterface class.
Definition at line 74 of file log.h.
Public Member Functions | |
| void | addMonitor (LogMonitorInterface *m) |
| void | lock () |
| Log () | |
| void | logRotateDone () |
| Log & | operator<< (const KUrl &url) |
| Log & | operator<< (Int64 v) |
| Log & | operator<< (Uint64 v) |
| Log & | operator<< (const QString &s) |
| Log & | operator<< (const char *s) |
| Log & | operator<< (Log &(*func)(Log &)) |
| template<class T> | |
| Log & | operator<< (T val) |
| void | removeMonitor (LogMonitorInterface *m) |
| void | setFilter (unsigned int filter) |
| void | setOutputFile (const QString &file, bool rotate) |
| void | setOutputToConsole (bool on) |
| virtual | ~Log () |
Friends | |
| BTCORE_EXPORT friend Log & | endl (Log &lg) |
Constructor & Destructor Documentation
Member Function Documentation
| void bt::Log::addMonitor | ( | LogMonitorInterface * | m | ) |
| void bt::Log::lock | ( | ) |
| void bt::Log::logRotateDone | ( | ) |
| Log & bt::Log::operator<< | ( | const KUrl & | url | ) |
| Log & bt::Log::operator<< | ( | const char * | s | ) |
template<class T>
| Log& bt::Log::operator<< | ( | T | val | ) | [inline] |
Write a number to the log file.
Anything which can be passed to QString::number will do.
- Parameters:
-
val The value
- Returns:
- This Log
| void bt::Log::removeMonitor | ( | LogMonitorInterface * | m | ) |
| void bt::Log::setFilter | ( | unsigned int | filter | ) |
| void bt::Log::setOutputFile | ( | const QString & | file, | |
| bool | rotate | |||
| ) |
| void bt::Log::setOutputToConsole | ( | bool | on | ) |
Friends And Related Function Documentation
The documentation for this class was generated from the following files:
KDE 4.2 API Reference