Logger declaration. More...
#include <ctime>
#include <fstream>
#include <list>
#include <map>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include "ace/Synch.h"
#include <boost/foreach.hpp>
#include <DataBox.hpp>
Go to the source code of this file.
Classes | |
class | mermaid::support::logging::FastLogger |
Fast implementation of the logger, without any thread synchronization. More... | |
class | mermaid::support::logging::FileOutput |
Appends LogMessage's to a file. More... | |
class | mermaid::support::logging::Logger |
Main class of the logger framework. More... | |
class | mermaid::support::logging::LogMessage |
This class represents a message of the logger. More... | |
class | mermaid::support::logging::LogOutput |
LogOutput is something that handles the Logger output. More... | |
class | mermaid::support::logging::LogScope |
LogScope is a helper to use the logger. More... | |
class | mermaid::support::logging::TerminalOutput |
Prints LogMessage's to the standard output. More... | |
class | mermaid::support::logging::ThreadSafeLogger |
Thread safe implementation of the logger. More... | |
class | mermaid::support::logging::ThreadSafeOutput |
Adds mutual exclusion to another output. More... | |
Namespaces | |
namespace | mermaid::support::logging |
Namespace for the Logging Framework. | |
Defines | |
#define | foreach BOOST_FOREACH |
#define | LBEGIN(logger, message) {std::ostringstream tmp; tmp << message; (logger)->begin(tmp.str());} |
#define | LEND(logger, message) {std::ostringstream tmp; tmp << message; (logger)->end(tmp.str());} |
#define | LERROR(logger, message) {std::ostringstream tmp; tmp << message; (logger)->error(tmp.str());} |
#define | LINFO(logger, message) {std::ostringstream tmp; tmp << message; (logger)->info(tmp.str());} |
#define | LSEPARATOR(logger, message) {std::ostringstream tmp; tmp << message; (logger)->separator(tmp.str());} |
#define | LSTEP(logger, message) {std::ostringstream tmp; tmp << message; (logger)->step(tmp.str());} |
#define | LWARN(logger, message) {std::ostringstream tmp; tmp << message; (logger)->warn(tmp.str());} |
Enumerations | |
enum | mermaid::support::logging::LogLevel { mermaid::support::logging::LOG_ERROR, mermaid::support::logging::LOG_WARN, mermaid::support::logging::LOG_INFO, mermaid::support::logging::LOG_BEGIN, mermaid::support::logging::LOG_STEP, mermaid::support::logging::LOG_SEPARATOR, mermaid::support::logging::LOG_END } |
The LogLevel enum lists all the logger levels. More... | |
Functions | |
string | mermaid::support::logging::LogAux::toStr (const set< string > &strings) |
Logger declaration.
Definition in file Logger.hpp.
#define foreach BOOST_FOREACH |
Enables a prototype for quick profiling of code, based on the logger. This was just an experiment, but it's already done so I'll let it be. Disables the shortcuts to the reporting levels, for speed purposes. Please mind that this will not affect any of the methods called log.
Definition at line 70 of file Logger.hpp.
#define LBEGIN | ( | logger, | |||
message | ) | {std::ostringstream tmp; tmp << message; (logger)->begin(tmp.str());} |
Logs a BEGIN using a std::ostringstream
. This macro crates a temporary std::ostringstream
, inserts message
into it and calls the method begin
from the logger you specified.
logger | The logger to use. Must evaluate to an instance of mermaid::support::logging::Logger | |
message | Somethog to be inserted into the std::ostringstream . May contain more << operators. |
Definition at line 126 of file Logger.hpp.
#define LEND | ( | logger, | |||
message | ) | {std::ostringstream tmp; tmp << message; (logger)->end(tmp.str());} |
Logs an END using a std::ostringstream
. This macro crates a temporary std::ostringstream
, inserts message
into it and calls the method end
from the logger you specified.
logger | The logger to use. Must evaluate to an instance of mermaid::support::logging::Logger | |
message | Somethog to be inserted into the std::ostringstream . May contain more << operators. |
Definition at line 162 of file Logger.hpp.
#define LERROR | ( | logger, | |||
message | ) | {std::ostringstream tmp; tmp << message; (logger)->error(tmp.str());} |
Logs an ERROR using a std::ostringstream
. This macro crates a temporary std::ostringstream
, inserts message
into it and calls the method error
from the logger you specified.
logger | The logger to use. Must evaluate to an instance of mermaid::support::logging::Logger | |
message | Somethog to be inserted into the std::ostringstream . May contain more << operators. |
Definition at line 88 of file Logger.hpp.
#define LINFO | ( | logger, | |||
message | ) | {std::ostringstream tmp; tmp << message; (logger)->info(tmp.str());} |
Logs an INFO using a std::ostringstream
. This macro crates a temporary std::ostringstream
, inserts message
into it and calls the method info
from the logger you specified.
logger | The logger to use. Must evaluate to an instance of mermaid::support::logging::Logger | |
message | Somethog to be inserted into the std::ostringstream . May contain more << operators. |
Definition at line 112 of file Logger.hpp.
#define LSEPARATOR | ( | logger, | |||
message | ) | {std::ostringstream tmp; tmp << message; (logger)->separator(tmp.str());} |
Logs a SEPARATOR using a std::ostringstream
. This macro crates a temporary std::ostringstream
, inserts message
into it and calls the method separator
from the logger you specified.
logger | The logger to use. Must evaluate to an instance of mermaid::support::logging::Logger | |
message | Somethog to be inserted into the std::ostringstream . May contain more << operators. |
Definition at line 138 of file Logger.hpp.
#define LSTEP | ( | logger, | |||
message | ) | {std::ostringstream tmp; tmp << message; (logger)->step(tmp.str());} |
Logs a STEP using a std::ostringstream
. This macro crates a temporary std::ostringstream
, inserts message
into it and calls the method step
from the logger you specified.
logger | The logger to use. Must evaluate to an instance of mermaid::support::logging::Logger | |
message | Somethog to be inserted into the std::ostringstream . May contain more << operators. |
Definition at line 150 of file Logger.hpp.
#define LWARN | ( | logger, | |||
message | ) | {std::ostringstream tmp; tmp << message; (logger)->warn(tmp.str());} |
Logs a WARN using a std::ostringstream
. This macro crates a temporary std::ostringstream
, inserts message
into it and calls the method warn
from the logger you specified.
logger | The logger to use. Must evaluate to an instance of mermaid::support::logging::Logger | |
message | Somethog to be inserted into the std::ostringstream . May contain more << operators. |
Definition at line 100 of file Logger.hpp.