OnixS C++ Eurex T7 Market and Reference Data Interface (EMDI, RDI, EOBI) Handlers  8.1.0
API documentation
HandlerLogger.h File Reference
#include <OnixS/Eurex/MarketData/LogSettings.h>
#include <logging/FileOutput.h>
#include <OnixS/HandlerCore/HandlerLogger.h>

Go to the source code of this file.

Classes

struct  VarFormatHelper< T >
 

Namespaces

 OnixS
 
 OnixS::Eurex
 
 OnixS::Eurex::MarketData
 
 OnixS::Eurex::MarketData::Implementation
 

Macros

#define DIRECTEDGE_SOURCE_INFO   ::OnixS::Logging::SourceInfo(__FILE__, __LINE__, BOOST_CURRENT_FUNCTION)
 
#define DIRECTEDGE_SOURCE_FUNC   ::OnixS::Logging::SourceInfo(nullptr, 0, BOOST_CURRENT_FUNCTION)
 
#define DIRECTEDGE_SOURCE_LINE   ::OnixS::Logging::SourceInfo(__FILE__, __LINE__, nullptr)
 
#define EXCEPTION_SOURCE_INFO   DIRECTEDGE_SOURCE_FUNC
 
#define LOG_SOURCE_INFO   OnixS::Logging::SourceInfo()
 
#define DECL_FORMAT(ftype)   TextBuilder & operator<<(TextBuilder & o, const ftype & obj)
 
#define DECL_FORMAT_BYVAL(ftype)   TextBuilder & operator<<(TextBuilder & o, ftype obj)
 
#define STRUCT_FORMAT(ftype, fformat)
 
#define STRUCT_FORMAT_T(ftype, fformat)
 
#define ENUM_FORMAT(fenumbox, fformat)
 
#define FENUM(fenum)   case __FENUM_BOX__::fenum: o << int(__FENUM_BOX__::fenum) << " ("#fenum")"; break;
 
#define API_ENUM_FORMAT(fenumbox, fformat)
 
#define ENUM_STR(fenum)   case __FENUM_BOX__::fenum: return #fenum;
 
#define VAR(var)   create_var_format(", "#var, var)
 
#define VARLN(var)   '\n' << create_var_format(#var, var)
 
#define COMPLEX_FIELD(s)   '\n' << indent(4) << create_var_format(#s, obj.s) << indent(-4)
 
#define FIELD(var)   '\n' << create_var_format(#var, obj.var)
 
#define FIELD_AS(var, ftype)   '\n' << create_var_format(#var, ftype(obj.var))
 
#define DATE_FIELD(var)   FIELD_AS(var, SDateWrapper)
 
#define TIME_FIELD(var)   FIELD_AS(var, STimeWrapper)
 
#define BOOL_FIELD(var)   FIELD_AS(var, OMexBool::Enum)
 
#define ASSERT_ARG(arg, cond)
 
#define DEBUG_ASSERT_ARG(arg, cond)   ((void)0)
 
#define ASSERT_COND(cond)
 
#define DEBUG_ASSERT_COND(cond)   ((void)0)
 
#define DEFAULT_LOG_LEVEL   Logging::LOG_LEVEL_INFO
 
#define TRACE_STATE(state, logger)   do {} while(false)
 
#define TRACE_FUNC_MINI(logger)   do {} while(false)
 
#define ONIXS_EXCEPTION_TRACED_CALLBACK_EX(callback, logger, logFacility, contextName)
 
#define ONIXS_EXCEPTION_TRACED_CALLBACK(callback, contextName)   ONIXS_EXCEPTION_TRACED_CALLBACK_EX(callback, logger_, this, contextName)
 

Typedefs

typedef boost::scoped_ptr< HandlerCore::Common::HandlerLogger > LoggerPtr
 

Functions

template<size_t NLen, typename T >
VarFormatHelper< T > create_var_format (const char(&name)[NLen], const T &value)
 
template<size_t NLen>
VarFormatHelper< unsigned > create_var_format (const char(&name)[NLen], unsigned char value)
 
template<size_t NLen>
VarFormatHelper< char > create_var_format (const char(&name)[NLen], char value)
 
template<size_t NLen, size_t NVal>
VarFormatHelper< ValuePtr > create_var_format (const char(&name)[NLen], const char(&value)[NVal])
 
TextBuilder & format_var_name (TextBuilder &o, ValuePtr name)
 
TextBuilder & format_nullptr_value (TextBuilder &o)
 
template<typename T >
TextBuilder & operator<< (TextBuilder &o, const VarFormatHelper< T > &var)
 
TextBuilder & operator<< (TextBuilder &o, const VarFormatHelper< ValuePtr > &obj)
 
TextBuilder & operator<< (TextBuilder &o, const VarFormatHelper< char > &obj)
 
void userExceptionHandler (HandlerCore::Common::HandlerLogger *, OnixS::Logging::LogFacility *, const char *contextName) ONIXS_NOEXCEPT
 

Macro Definition Documentation

#define API_ENUM_FORMAT (   fenumbox,
  fformat 
)
Value:
const char ONIXS_API * enumToString(fenumbox::Enum value) {\
typedef fenumbox __FENUM_BOX__;\
switch(value) { fformat default: return "#Invalid enumeration value"; } }
ONIXS_EUREX_EMDI_API std::string enumToString(HandlerState::Enum)
Returns string representation of HandlerState value.

Definition at line 83 of file HandlerLogger.h.

#define ASSERT_ARG (   arg,
  cond 
)
Value:
if(arg cond) {} else \
throw ArgumentExceptionImpl("Argument value does not meet condition: "#arg" "#cond, #arg, EXCEPTION_SOURCE_INFO)
#define EXCEPTION_SOURCE_INFO
Definition: HandlerLogger.h:45

Definition at line 105 of file HandlerLogger.h.

#define ASSERT_COND (   cond)
Value:
if(cond) {} else \
throw OperationExceptionImpl("Object state does not meet condition: "#cond, EXCEPTION_SOURCE_INFO)
#define EXCEPTION_SOURCE_INFO
Definition: HandlerLogger.h:45

Definition at line 114 of file HandlerLogger.h.

#define BOOL_FIELD (   var)    FIELD_AS(var, OMexBool::Enum)

Definition at line 98 of file HandlerLogger.h.

#define COMPLEX_FIELD (   s)    '\n' << indent(4) << create_var_format(#s, obj.s) << indent(-4)

Definition at line 93 of file HandlerLogger.h.

#define DATE_FIELD (   var)    FIELD_AS(var, SDateWrapper)

Definition at line 96 of file HandlerLogger.h.

#define DEBUG_ASSERT_ARG (   arg,
  cond 
)    ((void)0)

Definition at line 111 of file HandlerLogger.h.

#define DEBUG_ASSERT_COND (   cond)    ((void)0)

Definition at line 120 of file HandlerLogger.h.

#define DECL_FORMAT (   ftype)    TextBuilder & operator<<(TextBuilder & o, const ftype & obj)

Definition at line 54 of file HandlerLogger.h.

#define DECL_FORMAT_BYVAL (   ftype)    TextBuilder & operator<<(TextBuilder & o, ftype obj)

Definition at line 59 of file HandlerLogger.h.

#define DEFAULT_LOG_LEVEL   Logging::LOG_LEVEL_INFO

Definition at line 130 of file HandlerLogger.h.

#define DIRECTEDGE_SOURCE_FUNC   ::OnixS::Logging::SourceInfo(nullptr, 0, BOOST_CURRENT_FUNCTION)

Definition at line 33 of file HandlerLogger.h.

#define DIRECTEDGE_SOURCE_INFO   ::OnixS::Logging::SourceInfo(__FILE__, __LINE__, BOOST_CURRENT_FUNCTION)

Definition at line 32 of file HandlerLogger.h.

#define DIRECTEDGE_SOURCE_LINE   ::OnixS::Logging::SourceInfo(__FILE__, __LINE__, nullptr)

Definition at line 34 of file HandlerLogger.h.

#define ENUM_FORMAT (   fenumbox,
  fformat 
)
Value:
TextBuilder & operator<<(TextBuilder & o, fenumbox::Enum obj) {\
typedef fenumbox __FENUM_BOX__;\
switch(obj) { fformat default: if(obj ) o << int(obj) << " (?)";\
else format_nullptr_value(o); } return o; }
Util::TextBuilder TextBuilder
Definition: Formatting.h:43
TextBuilder & operator<<(TextBuilder &o, const VarFormatHelper< char > &obj)
TextBuilder & format_nullptr_value(TextBuilder &o)

Definition at line 74 of file HandlerLogger.h.

#define ENUM_STR (   fenum)    case __FENUM_BOX__::fenum: return #fenum;

Definition at line 89 of file HandlerLogger.h.

#define EXCEPTION_SOURCE_INFO   DIRECTEDGE_SOURCE_FUNC

Definition at line 45 of file HandlerLogger.h.

#define FENUM (   fenum)    case __FENUM_BOX__::fenum: o << int(__FENUM_BOX__::fenum) << " ("#fenum")"; break;

Definition at line 80 of file HandlerLogger.h.

#define FIELD (   var)    '\n' << create_var_format(#var, obj.var)

Definition at line 94 of file HandlerLogger.h.

#define FIELD_AS (   var,
  ftype 
)    '\n' << create_var_format(#var, ftype(obj.var))

Definition at line 95 of file HandlerLogger.h.

#define LOG_SOURCE_INFO   OnixS::Logging::SourceInfo()

Definition at line 46 of file HandlerLogger.h.

#define ONIXS_EXCEPTION_TRACED_CALLBACK (   callback,
  contextName 
)    ONIXS_EXCEPTION_TRACED_CALLBACK_EX(callback, logger_, this, contextName)

Definition at line 224 of file HandlerLogger.h.

#define ONIXS_EXCEPTION_TRACED_CALLBACK_EX (   callback,
  logger,
  logFacility,
  contextName 
)
Value:
try { callback;\
logger->log( ONIXS_LOG_DEBUG[logFacility] << "Callback " << contextName << " called successfully");\
} catch(...) { OnixS::Eurex::MarketData::Implementation::userExceptionHandler(logger, logFacility, contextName); } \
void userExceptionHandler(HandlerCore::Common::HandlerLogger *, OnixS::Logging::LogFacility *, const char *contextName) ONIXS_NOEXCEPT

Definition at line 219 of file HandlerLogger.h.

#define STRUCT_FORMAT (   ftype,
  fformat 
)
Value:
TextBuilder & operator<<(TextBuilder & o, const ftype & obj) {\
return o << Util::indent(4) fformat << Util::indent(-4);\
}
Util::TextBuilder TextBuilder
Definition: Formatting.h:43
TextBuilder & operator<<(TextBuilder &o, const VarFormatHelper< char > &obj)

Definition at line 63 of file HandlerLogger.h.

#define STRUCT_FORMAT_T (   ftype,
  fformat 
)
Value:
TextBuilder & operator<<(TextBuilder & o, const ftype & obj) {\
return o << '[' << #ftype << "]\n" << indent(4) fformat << indent(-4);\
}
Util::TextBuilder TextBuilder
Definition: Formatting.h:43
TextBuilder & operator<<(TextBuilder &o, const VarFormatHelper< char > &obj)

Definition at line 68 of file HandlerLogger.h.

#define TIME_FIELD (   var)    FIELD_AS(var, STimeWrapper)

Definition at line 97 of file HandlerLogger.h.

#define TRACE_FUNC_MINI (   logger)    do {} while(false)

Definition at line 146 of file HandlerLogger.h.

#define TRACE_STATE (   state,
  logger 
)    do {} while(false)

Definition at line 138 of file HandlerLogger.h.

#define VAR (   var)    create_var_format(", "#var, var)

Definition at line 91 of file HandlerLogger.h.

#define VARLN (   var)    '\n' << create_var_format(#var, var)

Definition at line 92 of file HandlerLogger.h.