eisgenerator 1.0.x
Public Types | Public Member Functions | Static Public Attributes | List of all members
eis::Log Class Reference

Public Types

enum  Level { DEBUG , INFO , WARN , ERROR }
 

Public Member Functions

 Log (Level type, bool endline=true)
 Constructor.
 
template<class T >
Logoperator<< (const T &msg)
 

Static Public Attributes

static bool headers
 If true output will be prefixed with a header detailing the origin of the message.
 
static Level level
 Minimum Level required for output to be printed.
 

Member Enumeration Documentation

◆ Level

Enumerator
DEBUG 

Messages useful for debugging.

INFO 

Messages of intrest to the user incl.

progress

WARN 

Non fatal errors or problems affecting performance or numeric precision

ERROR 

Fatal errors

Constructor & Destructor Documentation

◆ Log()

eis::Log::Log ( Level type,
bool endline = true )

Constructor.

This Constructor is to be used like a global stream. Thus if logging is desired the user of this api shal use Log(DEBUG)<<"This is a debugging meesage"; Using this constructor to create a lvalue has some negative side effects such as: Possibly holding a global lock for the lifetime of the object and potenttaly unintuative newline behavior.

Parameters
typeThe Level to use for this message.
endlineIf true an UNIX newline '
' will be emmited when the oject is destroyed