An implementation of QtlLogger which prints messages on standard output or other standard files.
More...
|
| QtlStdoutLogger (FILE *file=0, bool debug=false) |
| Constructor. More...
|
|
virtual void | debug (const QString &line, const QColor &color=QColor()) Q_DECL_OVERRIDE |
| Log a line of debug text. More...
|
|
virtual void | line (const QString &line, const QColor &color=QColor()) Q_DECL_OVERRIDE |
| Log a line of text. More...
|
|
void | setDebugMode (bool on) |
| Set / reset the debug mode. More...
|
|
virtual void | text (const QString &text) Q_DECL_OVERRIDE |
| Log text. More...
|
|
An implementation of QtlLogger which prints messages on standard output or other standard files.
◆ QtlStdoutLogger()
QtlStdoutLogger::QtlStdoutLogger |
( |
FILE * |
file = 0 , |
|
|
bool |
debug = false |
|
) |
| |
|
inline |
Constructor.
- Parameters
-
[in] | file | Standard file to use, stdout by default. |
[in] | debug | Activate debug if true. |
◆ text()
virtual void QtlStdoutLogger::text |
( |
const QString & |
text | ) |
|
|
inlinevirtual |
◆ line()
virtual void QtlStdoutLogger::line |
( |
const QString & |
line, |
|
|
const QColor & |
color = QColor() |
|
) |
| |
|
inlinevirtual |
Log a line of text.
- Parameters
-
[in] | line | Line to log. No need to contain a trailing new-line character. |
[in] | color | When a valid color is passed, try to display the text in this color. Present by contract from QtlLogger but ignored. |
Implements QtlLogger.
◆ debug()
virtual void QtlStdoutLogger::debug |
( |
const QString & |
line, |
|
|
const QColor & |
color = QColor() |
|
) |
| |
|
inlinevirtual |
Log a line of debug text.
- Parameters
-
[in] | line | Line to log. No need to contain a trailing new-line character. |
[in] | color | When a valid color is passed, try to display the text in this color. Present by contract from QtlLogger but ignored. |
Implements QtlLogger.
◆ setDebugMode()
void QtlStdoutLogger::setDebugMode |
( |
bool |
on | ) |
|
|
inline |
Set / reset the debug mode.
- Parameters
-
[in] | on | When true, the debug() lines are displayed. When false, they are discarded. |
◆ _out
QTextStream QtlStdoutLogger::_out |
|
private |
◆ _debug
bool QtlStdoutLogger::_debug |
|
private |
The documentation for this class was generated from the following file: