mermaid::support::logging::FastLogger Class Reference

Fast implementation of the logger, without any thread synchronization. More...

#include <Logger.hpp>

Inheritance diagram for mermaid::support::logging::FastLogger:
Inheritance graph
[legend]
Collaboration diagram for mermaid::support::logging::FastLogger:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void begin (const std::string &message="")
 Logs a string with the level LOG_BEGIN.
void disableAllLogLevels ()
 Disables all outputs for all the levels, completely stopping the Logger.
void disableAllLogLevels (shared_ptr< LogOutput > logOutput)
 Disables all levels for the given output.
virtual void disableLogLevel (const LogLevel &logLevel)
 Disables all outputs for the specified logLevel.
virtual void disableLogLevel (const LogLevel &logLevel, shared_ptr< LogOutput > logOutput)
 Disables a specified output for a specific level.
void enableAllLogLevels (shared_ptr< LogOutput > logOutput)
 Enables all levels for the given output.
void enableErrorLogLevels (shared_ptr< LogOutput > logOutput)
 Enables the error levels (LOG_ERROR, LOG_WARN and LOG_INFO) for the given output.
virtual void enableLogLevel (const LogLevel &logLevel, shared_ptr< LogOutput > logOutput)
 Enables a specific output for a specific log level.
void enableReportingLogLevels (shared_ptr< LogOutput > logOutput)
 Enables the reporting levels (LOG_BEGIN, LOG_END, LOG_STEP and LOG_SEPARATOR) for the given output.
void end (const std::string &message="")
 Logs a string with the level LOG_END.
void error (const std::string &message)
 Logs a string with the level LOG_ERROR.
void info (const std::string &message)
 Logs a string with the level LOG_INFO.
void log (const LogLevel &logLevel, const mermaid::support::data::DataBox &message)
 Logs a DataBox.
virtual void log (const LogLevel &logLevel, const std::string &message)
 Logs a message, given in the form of a string.
void separator (const std::string &message="")
 Logs a string with the level LOG_SEPARATOR.
virtual void setPrefix (const std::string &prefix)
 Sets the prefix of the FastLogger.
void step (const std::string &message)
 Logs a string with the level LOG_STEP.
void warn (const std::string &message)
 Logs a string with the level LOG_WARN.

Static Public Member Functions

static shared_ptr< Loggerbuild (const std::string &prefix)
 Creates a new FastLogger with the given prefix.
static shared_ptr< Loggerbuild ()
 Creates a new FastLogger with an empty prefix.

Detailed Description

Fast implementation of the logger, without any thread synchronization.

Author:
Joao Reis

Definition at line 565 of file Logger.hpp.


Member Function Documentation

void mermaid::support::logging::Logger::begin ( const std::string &  message = ""  )  [inline, inherited]

Logs a string with the level LOG_BEGIN.

Parameters:
message The message to log.
Author:
Joao Reis

Definition at line 840 of file Logger.hpp.

shared_ptr< Logger > FastLogger::build ( const std::string &  prefix  )  [static]

Creates a new FastLogger with the given prefix.

Returns:
A shared_ptr to the new Logger.
Parameters:
prefix The prefix to use.
Author:
Joao Reis

Definition at line 56 of file FastLogger.cpp.

shared_ptr< Logger > FastLogger::build (  )  [static]

Creates a new FastLogger with an empty prefix.

Returns:
A shared_ptr to the new Logger.
Author:
Joao Reis

Definition at line 49 of file FastLogger.cpp.

void Logger::disableAllLogLevels (  )  [inherited]

Disables all outputs for all the levels, completely stopping the Logger.

This method will stop the logger if you need it. It is necessary because you cannot delete the logger, it is always a shared_ptr.

Author:
Joao Reis

Definition at line 64 of file Logger.cpp.

void Logger::disableAllLogLevels ( shared_ptr< LogOutput logOutput  )  [inherited]

Disables all levels for the given output.

Parameters:
logOutput Will disable the levels for this logOutput.
Author:
Joao Reis

Definition at line 54 of file Logger.cpp.

void FastLogger::disableLogLevel ( const LogLevel logLevel  )  [virtual]

Disables all outputs for the specified logLevel.

Parameters:
logLevel All the outputs of this level will be disabled.
Author:
Joao Reis

Implements mermaid::support::logging::Logger.

Definition at line 115 of file FastLogger.cpp.

void FastLogger::disableLogLevel ( const LogLevel logLevel,
shared_ptr< LogOutput logOutput 
) [virtual]

Disables a specified output for a specific level.

Parameters:
logLevel The logOutput will be disabled only for this level.
logOutput The logOutput to disble for the logLevel.
Author:
Joao Reis

Implements mermaid::support::logging::Logger.

Definition at line 107 of file FastLogger.cpp.

void Logger::enableAllLogLevels ( shared_ptr< LogOutput logOutput  )  [inherited]

Enables all levels for the given output.

Parameters:
logOutput Will enable the levels for this logOutput.
Author:
Joao Reis

Definition at line 49 of file Logger.cpp.

void Logger::enableErrorLogLevels ( shared_ptr< LogOutput logOutput  )  [inherited]

Enables the error levels (LOG_ERROR, LOG_WARN and LOG_INFO) for the given output.

Parameters:
logOutput Will enable the levels for this logOutput.
Author:
Joao Reis

Definition at line 36 of file Logger.cpp.

void FastLogger::enableLogLevel ( const LogLevel logLevel,
shared_ptr< LogOutput logOutput 
) [virtual]

Enables a specific output for a specific log level.

Parameters:
logLevel The logLevel to associate.
logOutput The logOutput to associate with the logLevel.
Author:
Joao Reis

Implements mermaid::support::logging::Logger.

Definition at line 99 of file FastLogger.cpp.

void Logger::enableReportingLogLevels ( shared_ptr< LogOutput logOutput  )  [inherited]

Enables the reporting levels (LOG_BEGIN, LOG_END, LOG_STEP and LOG_SEPARATOR) for the given output.

Parameters:
logOutput Will enable the levels for this logOutput.
Author:
Joao Reis

Definition at line 42 of file Logger.cpp.

void mermaid::support::logging::Logger::end ( const std::string &  message = ""  )  [inline, inherited]

Logs a string with the level LOG_END.

Parameters:
message The message to log.
Author:
Joao Reis

Definition at line 852 of file Logger.hpp.

void mermaid::support::logging::Logger::error ( const std::string &  message  )  [inline, inherited]

Logs a string with the level LOG_ERROR.

Parameters:
message The message to log.
Author:
Joao Reis

Definition at line 827 of file Logger.hpp.

void mermaid::support::logging::Logger::info ( const std::string &  message  )  [inline, inherited]

Logs a string with the level LOG_INFO.

Parameters:
message The message to log.
Author:
Joao Reis

Definition at line 835 of file Logger.hpp.

void mermaid::support::logging::Logger::log ( const LogLevel logLevel,
const mermaid::support::data::DataBox message 
) [inline, inherited]

Logs a DataBox.

Please mind that this method is not affected by MERMAID_LOGGER_DISABLE_REPORTING.

Parameters:
logLevel The log level to use.
message The message to log.
Author:
Joao Reis

Definition at line 819 of file Logger.hpp.

void FastLogger::log ( const LogLevel logLevel,
const std::string &  message 
) [virtual]

Logs a message, given in the form of a string.

This is the main method of the logger, all the others just call this one internally.

Please mind that this method is not affected by MERMAID_LOGGER_DISABLE_REPORTING.

Parameters:
logLevel The log level to use.
message The message to log.
Author:
Joao Reis

Implements mermaid::support::logging::Logger.

Definition at line 155 of file FastLogger.cpp.

void mermaid::support::logging::Logger::separator ( const std::string &  message = ""  )  [inline, inherited]

Logs a string with the level LOG_SEPARATOR.

Parameters:
message The message to log.
Author:
Joao Reis

Definition at line 844 of file Logger.hpp.

void FastLogger::setPrefix ( const std::string &  prefix  )  [virtual]

Sets the prefix of the FastLogger.

Each Logger can have exactly one prefix that is printed before every message.

Parameters:
prefix The prefix to use.
Author:
Joao Reis

Implements mermaid::support::logging::Logger.

Definition at line 122 of file FastLogger.cpp.

void mermaid::support::logging::Logger::step ( const std::string &  message  )  [inline, inherited]

Logs a string with the level LOG_STEP.

Parameters:
message The message to log.
Author:
Joao Reis

Definition at line 848 of file Logger.hpp.

void mermaid::support::logging::Logger::warn ( const std::string &  message  )  [inline, inherited]

Logs a string with the level LOG_WARN.

Parameters:
message The message to log.
Author:
Joao Reis

Definition at line 831 of file Logger.hpp.

Generated on Fri Mar 4 22:15:48 2011 for MeRMaID::support by  doxygen 1.6.3