Defines | Variables

Log_Macros.h File Reference

#include "ace/Log_Msg.h"
#include "dds4ccm/impl/dds4ccm_dds_impl_export.h"

Defines

#define DDS4CCM_INFO   "(%P|%t) [%M] - %T - "
#define DDS4CCM_LOG_LEVEL_ERROR   1
#define DDS4CCM_LOG_LEVEL_CAST_ERROR   2
#define DDS4CCM_LOG_LEVEL_DDS_NIL_RETURN   3
#define DDS4CCM_LOG_LEVEL_4   4
#define DDS4CCM_LOG_LEVEL_5   5
#define DDS4CCM_LOG_LEVEL_ACTION   6
#define DDS4CCM_LOG_LEVEL_UNIMP_ACTION   7
#define DDS4CCM_LOG_LEVEL_ACTION_STARTING   8
#define DDS4CCM_LOG_LEVEL_CAST_SUCCESSFUL   9
#define DDS4CCM_LOG_LEVEL_DDS_STATUS   10
#define DDS4CCM_NTRACE   1
#define DDS4CCM_TRACE(X)   do {} while (0)
#define DDS4CCM_ENABLE_TRACE(X)   do {} while (0)
#define DDS4CCM_DISABLE_TRACE(X)   do {} while (0)
#define DDS4CCM_ERROR(L, X)
#define DDS4CCM_DEBUG(L, X)
#define DDS4CCM_PRINT_INTERNAL_EXCEPTION(L, E, X)
#define DDS4CCM_PRINT_CORBA_EXCEPTION(L, E, X)
#define DDS4CCM_ERROR_RETURN(L, X, Y)
#define DDS4CCM_ERROR_BREAK(L, X)   { DDS4CCM_ERROR (L, X); break; }

Variables

DDS4CCM_DDS_IMPL_Export
unsigned int 
DDS4CCM_debug_level

Detailed Description

Author:
William R. Otte <wotte@dre.vanderbilt.edu>

Macros used for logging in DDS4CCM


Define Documentation

#define DDS4CCM_DEBUG (   L,
 
)
Value:
do { \
    if (DDS4CCM_debug_level >= L) \
      { \
        int const __ace_error = ACE_Log_Msg::last_error_adapter (); \
        ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
        ace___->conditional_set (__FILE__, __LINE__, 0, __ace_error); \
        ace___->log X; \
      } \
  } while (0)
#define DDS4CCM_DISABLE_TRACE (   X )    do {} while (0)
#define DDS4CCM_ENABLE_TRACE (   X )    do {} while (0)
#define DDS4CCM_ERROR (   L,
 
)
Value:
do { \
    if (DDS4CCM_debug_level >= L) \
      { \
        int const __ace_error = ACE_Log_Msg::last_error_adapter (); \
        ACE_Log_Msg *ace___ = ACE_Log_Msg::instance ();               \
        ace___->conditional_set (__FILE__, __LINE__, -1, __ace_error); \
        ace___->log X; \
      } \
  } while (0)
#define DDS4CCM_ERROR_BREAK (   L,
 
)    { DDS4CCM_ERROR (L, X); break; }
#define DDS4CCM_ERROR_RETURN (   L,
  X,
 
)
Value:
do { \
    if (DDS4CCM_debug_level >= L) \
      { \
        int const __ace_error = ACE_Log_Msg::last_error_adapter (); \
        ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \
        ace___->conditional_set (__FILE__, __LINE__, Y, __ace_error); \
        ace___->log X; \
      } \
    return Y; \
  } while (0)
#define DDS4CCM_INFO   "(%P|%t) [%M] - %T - "
#define DDS4CCM_LOG_LEVEL_4   4
#define DDS4CCM_LOG_LEVEL_5   5
#define DDS4CCM_LOG_LEVEL_ACTION   6
#define DDS4CCM_LOG_LEVEL_ACTION_STARTING   8
#define DDS4CCM_LOG_LEVEL_CAST_ERROR   2
#define DDS4CCM_LOG_LEVEL_CAST_SUCCESSFUL   9
#define DDS4CCM_LOG_LEVEL_DDS_NIL_RETURN   3
#define DDS4CCM_LOG_LEVEL_DDS_STATUS   10
#define DDS4CCM_LOG_LEVEL_ERROR   1
#define DDS4CCM_LOG_LEVEL_UNIMP_ACTION   7
#define DDS4CCM_NTRACE   1
#define DDS4CCM_PRINT_CORBA_EXCEPTION (   L,
  E,
 
)
Value:
do { \
    if (DDS4CCM_debug_level >= L) \
      { \
        ACE_CString msg (X);\
        msg += " - Caught CORBA exception.\n";\
        DDS4CCM_ERROR (L, (LM_ERROR, msg.c_str ()));\
        E._tao_print_exception (X);\
      } \
  } while (0)
#define DDS4CCM_PRINT_INTERNAL_EXCEPTION (   L,
  E,
 
)
Value:
do { \
    if (DDS4CCM_debug_level >= L) \
      { \
        ACE_CString msg (X);\
        msg += " - Caught CCM_DDS internal exception: error <";\
        msg += E; \
        msg += ">\n";\
        DDS4CCM_ERROR (L, (LM_ERROR, msg.c_str ()));\
      } \
  } while (0)
#define DDS4CCM_TRACE (   X )    do {} while (0)

Variable Documentation

DDS4CCM_DDS_IMPL_Export unsigned int DDS4CCM_debug_level
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines