diff options
author | Phil Mesnier <mesnier_p@ociweb.com> | 2013-05-13 15:55:41 +0000 |
---|---|---|
committer | Phil Mesnier <mesnier_p@ociweb.com> | 2013-05-13 15:55:41 +0000 |
commit | 65e70ed0e2c34022791958063beff82b339d1c5a (patch) | |
tree | 05c800e71a3174e99b3403ba7d7ec9ced0f80cfd /DAnCE/dance/Logger/Log_Macros.h | |
parent | 742f5c4b5f4e4042c8b5dfce15184920aa8f116f (diff) | |
download | ATCD-65e70ed0e2c34022791958063beff82b339d1c5a.tar.gz |
merge from trunkOCI_Asynch_IMR
Diffstat (limited to 'DAnCE/dance/Logger/Log_Macros.h')
-rw-r--r-- | DAnCE/dance/Logger/Log_Macros.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/DAnCE/dance/Logger/Log_Macros.h b/DAnCE/dance/Logger/Log_Macros.h index db75b5db10c..a9aacb3cfe4 100644 --- a/DAnCE/dance/Logger/Log_Macros.h +++ b/DAnCE/dance/Logger/Log_Macros.h @@ -9,6 +9,8 @@ #ifndef DANCE_LOG_MACROS_H_ #define DANCE_LOG_MACROS_H_ +#include "ace/Log_Category.h" + #include "DAnCE_Logger_Export.h" #if !defined (DLINFO) @@ -17,6 +19,8 @@ extern DAnCE_Logger_Export unsigned int DAnCE_debug_level; +extern DAnCE_Logger_Export ACE_Log_Category DAnCE_log_category; + // Defines for logging levels /// Used for errors that cause the fatal shutdown of any portion @@ -102,7 +106,8 @@ extern DAnCE_Logger_Export unsigned int DAnCE_debug_level; if (DAnCE_debug_level >= L) \ { \ int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \ + ACE_Log_Category_TSS *ace___ = DAnCE_log_category.per_thr_obj (); \ + if (ace___ == 0) break; \ ace___->conditional_set (__FILE__, __LINE__, -1, __ace_error); \ ace___->log X; \ } \ @@ -114,7 +119,8 @@ extern DAnCE_Logger_Export unsigned int DAnCE_debug_level; if (DAnCE_debug_level >= L) \ { \ int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \ + ACE_Log_Category_TSS *ace___ = DAnCE_log_category.per_thr_obj (); \ + if (ace___ == 0) break; \ ace___->conditional_set (__FILE__, __LINE__, 0, __ace_error); \ ace___->log X; \ } \ @@ -126,7 +132,8 @@ extern DAnCE_Logger_Export unsigned int DAnCE_debug_level; if (DAnCE_debug_level >= L) \ { \ int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \ + ACE_Log_Category_TSS *ace___ = DAnCE_log_category.per_thr_obj (); \ + if (ace___ == 0) break; \ ace___->conditional_set (__FILE__, __LINE__, 0, __ace_error); \ ace___->log X; \ } \ @@ -138,7 +145,8 @@ extern DAnCE_Logger_Export unsigned int DAnCE_debug_level; if (DAnCE_debug_level >= L) \ { \ int const __ace_error = ACE_Log_Msg::last_error_adapter (); \ - ACE_Log_Msg *ace___ = ACE_Log_Msg::instance (); \ + ACE_Log_Category_TSS *ace___ = DAnCE_log_category.per_thr_obj (); \ + if (ace___ == 0) break; \ ace___->conditional_set (__FILE__, __LINE__, Y, __ace_error); \ ace___->log X; \ return Y; \ |