refs #350 Fixed CLogMessage methods for logging preformatted statusmessages.

This commit is contained in:
Mathew Sutcliffe
2014-12-08 00:23:51 +00:00
parent bf52390e01
commit 69905d310f
5 changed files with 29 additions and 55 deletions

View File

@@ -111,9 +111,6 @@ namespace BlackMisc
//! Set the severity to error, providing a format string.
CLogMessage &error(QString format);
//! Log message by status message
CLogMessage &statusMessage(const CStatusMessage &statusMessage);
//! Set the severity to info, providing a format string, and adding the validation category.
CLogMessage &validationInfo(QString format);
@@ -123,13 +120,6 @@ namespace BlackMisc
//! Set the severity to error, providing a format string, and adding the validation category.
CLogMessage &validationError(QString format);
//! Set the severity as in \sa CStatusMessage::StatusSeverity , and adding the validation category.
CLogMessage &validation(const CStatusMessage &statusMessage);
//! Set the severity as in \sa CStatusMessage::StatusSeverity , and adding the validation category.
//! \todo how to handle return value here, CLogMessageList?
void validations(const CStatusMessageList &statusMessages);
//! Streaming operators.
//! \details If the format string is empty, the message will consist of all streamed values separated by spaces.
//! Otherwise, the streamed values will replace the place markers %1, %2, %3... in the format string.
@@ -150,6 +140,12 @@ namespace BlackMisc
CLogMessage &operator <<(const CValueObject &v) { return arg(v.toQString()); }
//! @}
//! Sends a verbatim, preformatted message to the log.
static void preformatted(const CStatusMessage &statusMessage);
//! Sends a list of verbatim, preformatted messages to the log.
static void preformatted(const CStatusMessageList &statusMessages);
private:
QMessageLogger m_logger;
CStatusMessage::StatusSeverity m_severity = CStatusMessage::SeverityDebug;