OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Data Structures | Namespaces | Macros | Typedefs
log.hh File Reference
#include <ostream>
#include <stack>
#include <ost/log_sink.hh>
#include <ost/module_config.hh>

Go to the source code of this file.

Data Structures

class  Logger
 

Namespaces

 ost
 

Macros

#define OST_DO_LOGGING_(m, l)
 
#define WARN_DEPRECATED(m)   OST_DO_LOGGING_(m, ::ost::Logger::WARNING)
 
#define PUSH_VERBOSITY(n)   ::ost::Logger::Instance().PushVerbosityLevel(n)
 
#define POP_VERBOSITY(n)   ::ost::Logger::Instance().PopVerbosityLevel()
 
#define LOG_ERROR(m)   OST_DO_LOGGING_(m, ::ost::Logger::QUIET)
 
#define LOG_WARNING(m)   OST_DO_LOGGING_(m, ::ost::Logger::WARNING)
 
#define LOG_SCRIPT(m)   OST_DO_LOGGING_(m, ::ost::Logger::SCRIPT)
 
#define LOG_INFO(m)   OST_DO_LOGGING_(m, ::ost::Logger::INFO)
 
#define LOG_VERBOSE(m)   OST_DO_LOGGING_(m, ::ost::Logger::VERBOSE)
 
#define LOG_DEBUG(m)   OST_DO_LOGGING_(m, ::ost::Logger::DEBUG)
 
#define LOG_TRACE(m)   OST_DO_LOGGING_(m, ::ost::Logger::TRACE)
 

Typedefs

typedef std::stack< LogSinkPtr > LogSinkStack
 

Macro Definition Documentation

#define LOG_DEBUG (   m)    OST_DO_LOGGING_(m, ::ost::Logger::DEBUG)

Definition at line 93 of file log.hh.

#define LOG_ERROR (   m)    OST_DO_LOGGING_(m, ::ost::Logger::QUIET)

Definition at line 84 of file log.hh.

#define LOG_INFO (   m)    OST_DO_LOGGING_(m, ::ost::Logger::INFO)

Definition at line 87 of file log.hh.

#define LOG_SCRIPT (   m)    OST_DO_LOGGING_(m, ::ost::Logger::SCRIPT)

Definition at line 86 of file log.hh.

#define LOG_TRACE (   m)    OST_DO_LOGGING_(m, ::ost::Logger::TRACE)

Definition at line 94 of file log.hh.

#define LOG_VERBOSE (   m)    OST_DO_LOGGING_(m, ::ost::Logger::VERBOSE)

Definition at line 88 of file log.hh.

#define LOG_WARNING (   m)    OST_DO_LOGGING_(m, ::ost::Logger::WARNING)

Definition at line 85 of file log.hh.

#define OST_DO_LOGGING_ (   m,
 
)
Value:
if (::ost::Logger::Instance().GetVerbosityLevel()>=l) {\
std::stringstream tmp_s__; \
tmp_s__ << m << std::endl; \
::ost::Logger::Instance().GetCurrentSink()->LogMessage(tmp_s__.str(), l); \
}
LogSinkPtr GetCurrentSink()
Definition: log.hh:54
static Logger & Instance()

Definition at line 74 of file log.hh.

#define POP_VERBOSITY (   n)    ::ost::Logger::Instance().PopVerbosityLevel()

Definition at line 82 of file log.hh.

#define PUSH_VERBOSITY (   n)    ::ost::Logger::Instance().PushVerbosityLevel(n)

Definition at line 81 of file log.hh.

#define WARN_DEPRECATED (   m)    OST_DO_LOGGING_(m, ::ost::Logger::WARNING)

Definition at line 80 of file log.hh.