GridComputing
Job Management in Grid Computing
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Logger< WritePolicy > Class Template Reference

Logger singleton Class. More...

#include <log.h>

Public Member Functions

void Log (const char *format,...)
 Writes a message (printf style). All messages will be prefixed with current time.
 

Static Public Member Functions

static LoggerInstance ()
 Returns the singleton's instance of this class.
 

Private Attributes

std::mutex _mutex
 Mutex to make the class safe to multiple threads.
 
WritePolicy _writer
 A writer (console, file, etc.)
 

Static Private Attributes

static Logger_instance = NULL
 There's only one instance of this class.
 

Detailed Description

template<class WritePolicy>
class Logger< WritePolicy >

Logger singleton Class.

A class that enables to log messages to files, console and others

Member Function Documentation

template<class WritePolicy>
static Logger* Logger< WritePolicy >::Instance ( )
static

Returns the singleton's instance of this class.

template<class WritePolicy>
void Logger< WritePolicy >::Log ( const char *  format,
  ... 
)

Writes a message (printf style). All messages will be prefixed with current time.

Member Data Documentation

template<class WritePolicy>
Logger< WritePolicy > * Logger< WritePolicy >::_instance = NULL
staticprivate

There's only one instance of this class.

template<class WritePolicy>
std::mutex Logger< WritePolicy >::_mutex
private

Mutex to make the class safe to multiple threads.

template<class WritePolicy>
WritePolicy Logger< WritePolicy >::_writer
private

A writer (console, file, etc.)


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