diff options
author | mitza <mitza@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2013-04-12 20:42:19 +0000 |
---|---|---|
committer | mitza <mitza@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2013-04-12 20:42:19 +0000 |
commit | 28633cc335a5076b86ed76638f4e554b82fe23de (patch) | |
tree | 0d0e020fa71944ed9f3397516388f0b5606c5b6b /CIAO/ciao | |
parent | 8f39a8075fb890eaadd5d3d0d1e646f95431c553 (diff) | |
download | ATCD-28633cc335a5076b86ed76638f4e554b82fe23de.tar.gz |
ChangeLogTag: Fri Apr 12 20:40:54 UTC 2013 Adam Mitz <mitza@ociweb.com>
Diffstat (limited to 'CIAO/ciao')
-rw-r--r-- | CIAO/ciao/Logger/Log_Macros.cpp | 1 | ||||
-rw-r--r-- | CIAO/ciao/Logger/Log_Macros.h | 13 |
2 files changed, 11 insertions, 3 deletions
diff --git a/CIAO/ciao/Logger/Log_Macros.cpp b/CIAO/ciao/Logger/Log_Macros.cpp index 6b7dd6aeac9..b5151595b15 100644 --- a/CIAO/ciao/Logger/Log_Macros.cpp +++ b/CIAO/ciao/Logger/Log_Macros.cpp @@ -4,3 +4,4 @@ CIAO_Logger_Export unsigned int CIAO_debug_level = 0; +CIAO_Logger_Export ACE_Log_Category CIAO_log_category ("CIAO"); diff --git a/CIAO/ciao/Logger/Log_Macros.h b/CIAO/ciao/Logger/Log_Macros.h index 33c4d33ab95..5092e14cd6d 100644 --- a/CIAO/ciao/Logger/Log_Macros.h +++ b/CIAO/ciao/Logger/Log_Macros.h @@ -9,6 +9,8 @@ #ifndef CIAO_LOG_MACROS_H_ #define CIAO_LOG_MACROS_H_ +#include "ace/Log_Category.h" + // default information printed with CIAO logging messages. #include "CIAO_Logger_Export.h" @@ -19,6 +21,8 @@ extern CIAO_Logger_Export unsigned int CIAO_debug_level; +extern CIAO_Logger_Export ACE_Log_Category CIAO_log_category; + // By default tracing is turned off. #if !defined (CIAO_NTRACE) # define CIAO_NTRACE 1 @@ -62,7 +66,8 @@ extern CIAO_Logger_Export unsigned int CIAO_debug_level; if (CIAO_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___ = CIAO_log_category.per_thr_obj (); \ + if (ace___ == 0) break; \ ace___->conditional_set (__FILE__, __LINE__, -1, __ace_error); \ ace___->log X; \ } \ @@ -74,7 +79,8 @@ extern CIAO_Logger_Export unsigned int CIAO_debug_level; if (CIAO_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___ = CIAO_log_category.per_thr_obj (); \ + if (ace___ == 0) break; \ ace___->conditional_set (__FILE__, __LINE__, 0, __ace_error); \ ace___->log X; \ } \ @@ -86,7 +92,8 @@ extern CIAO_Logger_Export unsigned int CIAO_debug_level; if (CIAO_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___ = CIAO_log_category.per_thr_obj (); \ + if (ace___ == 0) break; \ ace___->conditional_set (__FILE__, __LINE__, Y, __ace_error); \ ace___->log X; \ } \ |