|  | RobWorkProject
    23.9.11-
    | 
Write interface for Logs. More...
#include <LogWriter.hpp>
Inherited by LogBufferedChar, LogBufferedMsg, LogFileWriter, LogMultiWriter, and LogStreamWriter.
| Public Types | |
| typedef rw::core::Ptr< LogWriter > | Ptr | 
| smart pointer type to this class | |
| Public Member Functions | |
| virtual | ~LogWriter () | 
| Descructor. | |
| void | flush () | 
| Flush method. | |
| void | setTabLevel (int tabLevel) | 
| Set the tab level. | |
| void | write (const std::string &str) | 
| Writes str to the log.  More... | |
| void | write (const Message &msg) | 
| Writes msg to the log.  More... | |
| void | writeln (const std::string &str) | 
| Writes str as a line.  More... | |
| template<class T > | |
| LogWriter & | operator<< (T t) | 
| general stream operator | |
| LogWriter & | operator<< (const std::string &str) | 
| specialized stream operator 2 | |
| LogWriter & | operator<< (const Message &msg) | 
| Write Message to log.  More... | |
| LogWriter & | operator<< (const char *str) | 
| specialized stream operator | |
| LogWriter & | operator<< (std::ostream &(*pf)(std::ostream &)) | 
| Handle the std::endl and other stream functions. | |
| Protected Member Functions | |
| virtual void | doWrite (const std::string &message)=0 | 
| virtual void | doSetTabLevel (int tabLevel)=0 | 
| virtual void | doFlush ()=0 | 
Write interface for Logs.
LogWriter provides an output strategy for a log.
| void write | ( | const Message & | msg | ) | 
Writes msg to the log.
Default behavior is to use write(const std::string&) for the standard streaming representation of msg.
| msg | [in] message to write | 
| void write | ( | const std::string & | str | ) | 
Writes str to the log.
| str | [in] message to write | 
| void writeln | ( | const std::string & | str | ) | 
Writes str as a line.
By default writeln writes str followed by a '\n'. However, logs are free to implement a line change differently.