Public Member Functions | |
| void | Fill (const unsigned long &id, const MsgLevel &logLevel, const std::string &sender, const std::string &message, const time_t &msgTime=0) |
| fill this object with message informations | |
| unsigned long | GetId () const |
| get message id | |
| time_t | GetTime () const |
| get message time (unix time format) | |
| MsgLevel | GetLogLevel () const |
| get log level | |
| const std::string & | GetTimeString () const |
| get message time as string (format: YYYY-mm-DD-HH-MM-ss) | |
| const std::string & | GetSender () const |
| get message sender | |
| const std::string & | GetMessage () const |
| get message text | |
| const QLogInfo & | operator= (const QLogInfo &other) |
| all the data members are coped to the new object | |
Private Member Functions | |
| bool | EvalTimeString (const std::string &format="%Y-%m-%d %H:%M:%S") |
| fill fTimeString using the time value in fTime and the specified format | |
Private Attributes | |
| unsigned long | fMsgId |
| MsgLevel | fLogLevel |
| time_t | fTime |
| std::string | fTimeString |
| std::string | fSender |
| std::string | fMessage |
| void QLogInfo::Fill | ( | const unsigned long & | id, | |
| const MsgLevel & | logLevel, | |||
| const std::string & | sender, | |||
| const std::string & | message, | |||
| const time_t & | msgTime = 0 | |||
| ) |
fill this object with message informations
| id | unique message identifier | |
| logLevel | log level as defined in QMessageDefs.hh | |
| sender | message sender | |
| message | message text | |
| msgTime | unix time of log message. 0 (default) is now |
References EvalTimeString().
Referenced by QMsgClient::GetMessage(), and QGuiControlWindow::SetFormattedMessage().
| bool QLogInfo::EvalTimeString | ( | const std::string & | format = "%Y-%m-%d %H:%M:%S" |
) | [private] |
fill fTimeString using the time value in fTime and the specified format
| format | time string format, as defined in strftime. A default format is assumed ("%Y-%m-%d %H:%M:%S") if no arguments are supplied to this function. |
Referenced by Fill().
1.5.6