#include <console_logger.h>
Inheritance diagram for console_logger:


Public Member Functions | |
| console_logger (bool standard_error=false) | |
| if "standard_error" is true, than stderr is used instead of stdout. | |
| virtual | ~console_logger () |
| IMPLEMENT_CLASS_NAME ("console_logger") | |
| bool | standard_output () const |
| reports if the logger goes to standard output (default). | |
| bool | standard_error () const |
| reports if the logger goes to standard error instead. | |
| void | set_output (bool standard_error) |
| allows the target of logging to be changed after construction. | |
| virtual outcome | log (const istring &info, int filter=ALWAYS_PRINT) |
| sends the string "info" to the standard output device. | |
The object can optionally be used to log to the standard error device instead.
Definition at line 29 of file console_logger.h.
| console_logger::console_logger | ( | bool | standard_error = false |
) |
if "standard_error" is true, than stderr is used instead of stdout.
Definition at line 25 of file console_logger.cpp.
| console_logger::~console_logger | ( | ) | [virtual] |
Definition at line 29 of file console_logger.cpp.
| console_logger::IMPLEMENT_CLASS_NAME | ( | "console_logger" | ) |
| bool console_logger::standard_output | ( | ) | const [inline] |
reports if the logger goes to standard output (default).
Definition at line 38 of file console_logger.h.
| bool console_logger::standard_error | ( | ) | const [inline] |
reports if the logger goes to standard error instead.
Definition at line 40 of file console_logger.h.
| void console_logger::set_output | ( | bool | standard_error | ) | [inline] |
allows the target of logging to be changed after construction.
Definition at line 43 of file console_logger.h.
sends the string "info" to the standard output device.
if the "filter" is not in the current filter set, then the information will be dropped. otherwise the information is displayed, where appropriate. for some environments, this will essentially throw it away. for example, in ms-windows, a windowed program will only save standard out if one redirects standard output to a file, whereas a console mode program will output the text to its parent prompt.
Implements log_base.
Definition at line 31 of file console_logger.cpp.
References log_base::eol(), log_base::get_ending(), log_base::member(), log_base::NO_ENDING, common::OKAY, and istring::s().
Referenced by log(), and combo_logger::log().
1.5.1