cppcore
A small, portable C++ core library
Loading...
Searching...
No Matches
Logger.h File Reference
Include dependency graph for Logger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  cppcore::AbstractLogStream
 This pure abstract interface class declares the protocol for log-stream implementation. More...
class  cppcore::Logger
 This class implements a simple logger. More...

Namespaces

namespace  cppcore

Macros

#define DECL_LOG_MODULE(name)
 The default log tag, used for all log messages if no other tag is specified.
#define log_trace(domain, msg)
#define log_debug(domain, msg)
#define log_info(domain, msg)
#define log_warn(domain, message)
#define log_error(domain, message)
#define log_fatal(domain, message)

Typedefs

using cppcore::String = TStringBase<char>

Functions

void cppcore::tracePrint (const String &domain, const String &file, int line, const String &msg)
void cppcore::debugPrint (const String &domain, const String &file, int line, const String &msg)
void cppcore::infoPrint (const String &domain, const String &file, int line, const String &msg)
void cppcore::warnPrint (const String &domain, const String &file, int line, const String &msg)
void cppcore::errorPrint (const String &domain, const String &file, int line, const String &msg)
void cppcore::fatalPrint (const String &domain, const String &file, int line, const String &msg)

Macro Definition Documentation

◆ DECL_LOG_MODULE

#define DECL_LOG_MODULE ( name)
Value:
static constexpr char Tag[] = #name;

The default log tag, used for all log messages if no other tag is specified.

Definition at line 32 of file Logger.h.

◆ log_debug

#define log_debug ( domain,
msg )
Value:
::cppcore::debugPrint(domain, __FILE__, __LINE__, msg)
void debugPrint(const String &domain, const String &file, int line, const String &msg)
Definition Logger.cpp:283

Definition at line 227 of file Logger.h.

◆ log_error

#define log_error ( domain,
message )
Value:
::cppcore::errorPrint(domain, __FILE__, __LINE__, message)
void errorPrint(const String &domain, const String &file, int line, const String &msg)
Definition Logger.cpp:304

Definition at line 251 of file Logger.h.

◆ log_fatal

#define log_fatal ( domain,
message )
Value:
::cppcore::fatalPrint(domain, __FILE__, __LINE__, message)
void fatalPrint(const String &domain, const String &file, int line, const String &msg)
Definition Logger.cpp:311

Definition at line 259 of file Logger.h.

◆ log_info

#define log_info ( domain,
msg )
Value:
::cppcore::infoPrint(domain, __FILE__, __LINE__, msg)
void infoPrint(const String &domain, const String &file, int line, const String &msg)
Definition Logger.cpp:290

Definition at line 235 of file Logger.h.

◆ log_trace

#define log_trace ( domain,
msg )
Value:
::cppcore::tracePrint(domain, __FILE__, __LINE__, msg)
void tracePrint(const String &domain, const String &file, int line, const String &msg)
Definition Logger.cpp:276

Definition at line 219 of file Logger.h.

◆ log_warn

#define log_warn ( domain,
message )
Value:
::cppcore::warnPrint(domain, __FILE__, __LINE__, message)
void warnPrint(const String &domain, const String &file, int line, const String &msg)
Definition Logger.cpp:297

Definition at line 243 of file Logger.h.