Thread-safe logger that can write log messages to console, file, etc.. More...
#include <logwriter.h>
Public Member Functions | |
void | postEntry (const LogEntry &entry) |
void | writeEntries () |
virtual void | writeString (const LogEntry &)=0 |
Thread-safe logger that can write log messages to console, file, etc..
By default, this is implemented by ConsoleLogger. If you want to log to a file or GUI instead, override the LogWriter::writeString function.
void SCS::LogWriter::postEntry | ( | const LogEntry & | entry | ) |
Post a log entry to the log queue. Can be called from any thread.
void SCS::LogWriter::writeEntries | ( | ) |
Write all entries from the queue by calling LogWriter::writeSring for each one. Should be called from the thread where it is safe to write to logfile, console, etc..
virtual void SCS::LogWriter::writeString | ( | const LogEntry & | ) | [pure virtual] |
Write an entry from the queue to the actual logger