An ostream-like class that we'll use for logging. More...
#include <Console.hh>
Public Member Functions | |
| ConsoleStream (std::ostream *_stream) | |
| Constructor. | |
| template<class T> | |
| ConsoleStream & | operator<< (const T &_rhs) |
| Redirect whatever is passed in to both our ostream (if non-NULL) and the log file (if open). | |
| template<class T> | |
| Console::ConsoleStream & | operator<< (const T &_rhs) |
| void | Prefix (const std::string &_lbl, const std::string &_file, unsigned int _line, int _color) |
| Print a prefix to both terminal and log file. | |
An ostream-like class that we'll use for logging.
|
inline |
Constructor.
| [in] | _stream | Pointer to an output stream operator. Can be NULL/nullptr. |
Referenced by operator<<().
| ConsoleStream & sdf::Console::ConsoleStream::operator<< | ( | const T & | _rhs | ) |
Redirect whatever is passed in to both our ostream (if non-NULL) and the log file (if open).
| [in] | _rhs | Content to be logged. |
References ConsoleStream().
| void sdf::Console::ConsoleStream::Prefix | ( | const std::string & | _lbl, |
| const std::string & | _file, | ||
| unsigned int | _line, | ||
| int | _color ) |
Print a prefix to both terminal and log file.
| [in] | _lbl | Text label |
| [in] | _file | File containing the error |
| [in] | _line | Line containing the error |
| [in] | _color | Color to make the label. Used only on terminal. |