#include <set>
#include <map>
#include <string>
#include <sstream>
#include <fstream>
#include "OBT.h"
#include "OBTSingleton.h"
#include "OBT_Exception.h"
Go to the source code of this file.
Namespaces | |
namespace | OBT |
Classes | |
class | OBT::TracerOutput |
Interface to output messages in a console. More... | |
class | OBT::Tracer |
Tracer used to output messages. More... | |
Defines | |
#define | TRACE(ID, MSG) |
Send a ID message to the log. | |
#define | TRACE_CRITICAL(MSG) TRACE( OBT_TRACE_CRITICAL, MSG ) |
Send a critical message to the log. | |
#define | TRACE_ERROR(MSG) TRACE( OBT_TRACE_ERROR, MSG ) |
Send an error message to the log. | |
#define | TRACE_WARNING(MSG) TRACE( OBT_TRACE_WARNING, MSG ) |
#define | TRACE_NOTICE(MSG) TRACE( OBT_TRACE_NOTICE, MSG ) |
#define | TRACE_INFO(MSG) TRACE( OBT_TRACE_INFO, MSG ) |
#define | TRACE_DEBUG(MSG) TRACE( OBT_TRACE_DEBUG, MSG ) |
Variables | |
template class OBT_API | OBT::Singleton< Tracer > |
The Tracer singleton. | |
OBT_API const unsigned int | OBT_TRACE_CRITICAL |
Id for TRACE_CRITICAL message. | |
OBT_API const unsigned int | OBT_TRACE_ERROR |
Id for TRACE_ERROR message. | |
OBT_API const unsigned int | OBT_TRACE_WARNING |
Id for TRACE_WARNING message. | |
OBT_API const unsigned int | OBT_TRACE_NOTICE |
Id for TRACE_NOTICE message. | |
OBT_API const unsigned int | OBT_TRACE_INFO |
Id for TRACE_INFO message. | |
OBT_API const unsigned int | OBT_TRACE_DEBUG |
Id for TRACE_DEBUG message. |
#define TRACE | ( | ID, | |||
MSG | ) |
Value:
{ \ OBT::Tracer& tracer = OBT::Singleton< OBT::Tracer >::getInstance() ; \ try \ { \ if( tracer.test( ID ) ) \ { \ std::ostringstream msgForDebugTRACE ; \ msgForDebugTRACE << MSG ; \ tracer.trace( ID, __FUNCTION__, __FILE__, __LINE__, msgForDebugTRACE.str().c_str() ); \ } \ } \ catch ( OBT::OBT_Exception& exception ) \ { \ tracer.trace( ID, __FUNCTION__, __FILE__, __LINE__, exception.what() ); \ } \ }
The message is logged only if the ID is previously registered.
Definition at line 292 of file OBTTrace.h.
#define TRACE_CRITICAL | ( | MSG | ) | TRACE( OBT_TRACE_CRITICAL, MSG ) |
#define TRACE_DEBUG | ( | MSG | ) | TRACE( OBT_TRACE_DEBUG, MSG ) |
Send a debug message to the log.
Definition at line 331 of file OBTTrace.h.
#define TRACE_ERROR | ( | MSG | ) | TRACE( OBT_TRACE_ERROR, MSG ) |
Send an error message to the log.
Definition at line 315 of file OBTTrace.h.
Referenced by OBT::Plugin::getInformation(), OBT::Plugin::load(), and OBT::Plugin::unload().
#define TRACE_INFO | ( | MSG | ) | TRACE( OBT_TRACE_INFO, MSG ) |
Send an info message to the log.
Definition at line 327 of file OBTTrace.h.
#define TRACE_NOTICE | ( | MSG | ) | TRACE( OBT_TRACE_NOTICE, MSG ) |
Send a notice message to the log.
Definition at line 323 of file OBTTrace.h.
#define TRACE_WARNING | ( | MSG | ) | TRACE( OBT_TRACE_WARNING, MSG ) |
Send a warning message to the log.
Definition at line 319 of file OBTTrace.h.
Referenced by OBT::getService(), and OBT::getServices().
OBT_API const unsigned int OBT_TRACE_CRITICAL |
OBT_API const unsigned int OBT_TRACE_DEBUG |
OBT_API const unsigned int OBT_TRACE_ERROR |
OBT_API const unsigned int OBT_TRACE_INFO |
OBT_API const unsigned int OBT_TRACE_NOTICE |
OBT_API const unsigned int OBT_TRACE_WARNING |