DAnCE ..
Defines | Variables

Log_Macros.h File Reference

#include "DAnCE_Logger_Export.h"

Defines

#define DLINFO   ACE_TEXT("(%P|%t) [%M] - %T - ")
#define DANCE_LOG_EMERGENCY   1
#define DANCE_LOG_TERMINAL_ERROR   2
#define DANCE_LOG_NONFATAL_ERROR   3
#define DANCE_LOG_ERROR   4
 Used to log detailed error information at the point of failure.
#define DANCE_LOG_WARNING   5
#define DANCE_LOG_MAJOR_EVENT   6
#define DANCE_LOG_MINOR_EVENT   7
#define DANCE_LOG_EVENT_TRACE   8
#define DANCE_LOG_MAJOR_DEBUG_INFO   9
#define DANCE_LOG_TRACE   10
#define DANCE_LOG_DETAILED_TRACE   11
#define DANCE_NTRACE   1
#define DANCE_TRACE(X)   do {} while (0)
#define DANCE_ENABLE_TRACE()   do {} while (0)
#define DANCE_DISABLE_TRACE()   do {} while (0)
#define DANCE_ERROR(L, X)
#define DANCE_DEBUG(L, X)
#define DANCE_TRACE_LOG(L, X)
#define DANCE_ERROR_RETURN(L, X, Y)
#define DANCE_ERROR_BREAK(L, X)   { DANCE_ERROR (L, X); break; }

Variables

DAnCE_Logger_Export unsigned int DAnCE_debug_level

Detailed Description

Author:
William R. Otte <wotte@dre.vanderbilt.edu> //
Id:
Log_Macros.h 93616 2011-03-22 11:32:47Z wotte

Macros used for logging in DAnCE


Define Documentation

#define DANCE_DEBUG (   L,
 
)
Value:
do { \
    if (DAnCE_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 DANCE_DISABLE_TRACE ( )    do {} while (0)
#define DANCE_ENABLE_TRACE ( )    do {} while (0)
#define DANCE_ERROR (   L,
 
)
Value:
do { \
    if (DAnCE_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 DANCE_ERROR_BREAK (   L,
 
)    { DANCE_ERROR (L, X); break; }
#define DANCE_ERROR_RETURN (   L,
  X,
 
)
Value:
do { \
    if (DAnCE_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 DANCE_LOG_DETAILED_TRACE   11
#define DANCE_LOG_EMERGENCY   1

Used for errors that cause the fatal shutdown of any portion of the infrastructure.

#define DANCE_LOG_ERROR   4

Used to log detailed error information at the point of failure.

#define DANCE_LOG_EVENT_TRACE   8

Used to trace significant actions within major/minor events. This will usually include starts for major/minor events.

#define DANCE_LOG_MAJOR_DEBUG_INFO   9

Used to display important configuration information that impacts the deployment process.

#define DANCE_LOG_MAJOR_EVENT   6

Used to indicate that a ``significant'' deployment event has completed. A 'major' event will depend heavily on the context in which it occurs. Major will include instance deployments/teardowns, process spawns, etc.

#define DANCE_LOG_MINOR_EVENT   7

Used to inficate a ``minor'' deployment event has completed. Minor events will usually change the state of a deployed instance, e.g. lifecycle changes (passivation, configuration complete), interceptor invocations, etc.

#define DANCE_LOG_NONFATAL_ERROR   3

Used for non-fatal deployment errors that do not cause deployment failure.

#define DANCE_LOG_TERMINAL_ERROR   2

Used for deployment errors at the point the error exits the process in question, or when a decision is made to cause the deployment to fail.

#define DANCE_LOG_TRACE   10

The following two statements are used to closely trace the execution of DAnCE code. If in doubt, a message should go into these categories. The difference between a TRACE and a DETAILED_TRACE will be largely a judgement call. These messages should be emitted using DANCE_TRACE_LOG (X, Y).

#define DANCE_LOG_WARNING   5

used to indicate that a questionable situation that doesn't cause deployment failure, but can cause undefined conditions.

#define DANCE_NTRACE   1
#define DANCE_TRACE (   X)    do {} while (0)
#define DANCE_TRACE_LOG (   L,
 
)
Value:
do { \
    if (DAnCE_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 DLINFO   ACE_TEXT("(%P|%t) [%M] - %T - ")

Variable Documentation

DAnCE_Logger_Export unsigned int DAnCE_debug_level
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines