MIRA
Public Member Functions | Protected Attributes | List of all members
Logger Class Reference

Helper class that is created to make one logging process atomic and thread safe. More...

#include <error/LoggingCore.h>

Inheritance diagram for Logger:
Inheritance graph
[legend]

Public Member Functions

 Logger (SeverityLevel level, const Time &time, const std::string &file, int line, const std::string &function, ThreadID threadID)
 The constructor taking the details of a log entry. More...
 
 ~Logger ()
 Destructor. More...
 
std::ostringstream & stream ()
 Get the underlying stream. More...
 

Protected Attributes

LogRecord mRecord
 
std::ostringstream mStream
 

Detailed Description

Helper class that is created to make one logging process atomic and thread safe.

The stream is used to collect log data and the logger destructor will notify the core the core about the new log record. Never use this class directly. Use the macros MIRA_LOG and MIRA_LOG_ATTR instead.

Constructor & Destructor Documentation

◆ Logger()

Logger ( SeverityLevel  level,
const Time time,
const std::string &  file,
int  line,
const std::string &  function,
ThreadID  threadID 
)
inline

The constructor taking the details of a log entry.

◆ ~Logger()

~Logger ( )
inline

Destructor.

Member Function Documentation

◆ stream()

std::ostringstream& stream ( )
inline

Get the underlying stream.

Returns
Stream

Member Data Documentation

◆ mRecord

LogRecord mRecord
protected

◆ mStream

std::ostringstream mStream
protected

The documentation for this class was generated from the following file: