29#ifndef Pt_System_LogRecord_h
30#define Pt_System_LogRecord_h
32#include <Pt/System/Api.h>
33#include <Pt/System/LogLevel.h>
34#include <Pt/SourceInfo.h>
35#include <Pt/NonCopyable.h>
99 , _source(
"unknown",
"unknown",
"unknown")
109 _text.str( std::string() );
115 {
return _text.str(); }
126 template <
typename T>
162 std::ostringstream _text;
Base class that disables copy construction and assignment.
Definition NonCopyable.h:59
Source code info class.
Definition SourceInfo.h:101
std::string text() const
Returns the textual of the record.
Definition LogRecord.h:114
const Pt::SourceInfo & sourceInfo() const
Returns the location in the source where the record was generated.
Definition LogRecord.h:122
LogLevel logLevel() const
Returns the severity level.
Definition LogRecord.h:118
LogRecord & operator<<(std::ios_base &(*op)(std::ios_base &))
Applies op to the log record's text.
Definition LogRecord.h:148
LogRecord & operator<<(std::ios &(*op)(std::ios &))
Applies op to the log record's text.
Definition LogRecord.h:141
LogRecord & operator<<(std::ostream &(*op)(std::ostream &))
Applies op to the log record's text.
Definition LogRecord.h:134
~LogRecord()
@ Destructor.
Definition LogRecord.h:103
LogRecord(const LogLevel &level)
Construct a log record with a severity level.
Definition LogRecord.h:97
void clear()
Clears all content of the record.
Definition LogRecord.h:107
LogRecord & operator<<(const T &value)
Appends value to the log record's text.
Definition LogRecord.h:127
LogRecord & operator<<(const Pt::SourceInfo &si)
Sets the source location of the log record.
Definition LogRecord.h:155
LogLevel
Severity of the log-message.
Definition LogLevel.h:41
System programming
Definition Connection.h:26
Core module.
Definition Allocator.h:33