libdrmconf  0.10.4
A library to program DMR radios.
Public Types | Public Member Functions | Protected Attributes | List of all members

Implements a log-message. More...

#include <logger.hh>

Inheritance diagram for LogMessage:
Inheritance graph
[legend]
Collaboration diagram for LogMessage:
Collaboration graph
[legend]

Public Types

enum  Level {
  DEBUG , INFO , WARNING , ERROR ,
  FATAL
}
 Possible log-levels. More...
 

Public Member Functions

 LogMessage (Level level, const QString &file, int line, const QString &message="")
 Constructor. More...
 
 LogMessage (const LogMessage &other)
 Copy constructor.
 
virtual ~LogMessage ()
 Destructor.
 
Level level () const
 Returns the level of the log message.
 
const QString & file () const
 Returns the source file.
 
int line () const
 Returns the source line.
 
const QString & message () const
 Returns the log message content.
 

Protected Attributes

Level _level
 The log level.
 
QString _file
 The source file.
 
int _line
 The source line.
 
QString _message
 The log message content.
 

Detailed Description

Implements a log-message.

Instances of this class will forward the content of this message automatically to the Logger instance upon destruction. That means, you do not need to forward log messages explicitly.

Member Enumeration Documentation

◆ Level

Possible log-levels.

Enumerator
DEBUG 

Level for debug messages. Will not be shown to the user unless requested.

INFO 

Level for informative messages. Will not be shown to the user unless requested.

WARNING 

Level for warning messages.

ERROR 

Level for error messages.

FATAL 

Level for fatal error messages.

Constructor & Destructor Documentation

◆ LogMessage()

LogMessage::LogMessage ( Level  level,
const QString &  file,
int  line,
const QString &  message = "" 
)

Constructor.

Parameters
levelSpecifies the level of the log message.
fileSpecifies the source file.
lineSpecifies the source line.
messageSpecifies the log message content.

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