UNIVERS
15.3
UNIVERS base processing software API
|
#include <hds_messenger_file.hpp>
Public Member Functions | |
MessengerFile (const QString &log_file_name) | |
virtual | ~MessengerFile () |
virtual void | sendMsg (const hds::Messenger::Message &msg) const |
virtual hds::Messenger::Message | getMsg () const |
bool | isReady () const |
void | flush () const |
Public Member Functions inherited from hds::Messenger | |
Messenger () | |
virtual | ~Messenger () |
void | info (const QString &str) const |
void | warning (const QString &str) const |
void | error (const QString &str) const |
void | debug (const QString &str) const |
Protected Member Functions | |
bool | prepare (const QString &log_file_name) |
Protected Attributes | |
QFile | m_log_file |
QTextStream | m_log_stream |
bool | m_is_ready |
Additional Inherited Members | |
Public Types inherited from hds::Messenger | |
enum | MsgType { UNDEFINED_MSG = 0, INFO_MSG, WARNING_MSG, ERROR_MSG, DEBUG_MSG, SHOW_PROGRESS_MSG, HIDE_PROGRESS_MSG, SET_PROGRESS_VALUE_MSG, SET_PROGRESS_RANGES_MSG, SET_PROGRESS_STATUS_MSG } |
Provides log messages sending to file.
hds::MessengerFile::MessengerFile | ( | const QString & | log_file_name | ) |
Default constructor with log file name provided.
Log file with provided name will be opened.
|
virtual |
Destruct object and close log file.
void hds::MessengerFile::flush | ( | ) | const |
Flushes any buffers to the log file.
|
virtual |
Nothing to do for file logger (always return false).
Implements hds::Messenger.
|
inline |
Is object ready to logging.
|
protected |
Open log file and prepare out text stream.
|
virtual |
Send message with provided type. Content of the message
should be defined in compliance with the type.
Implements hds::Messenger.
|
protected |
Is object ready to logging.
|
protected |
< Log file. Output text stream to log file.