summaryrefslogtreecommitdiff
path: root/CIAO/connectors/dds4ccm
diff options
context:
space:
mode:
authormitza <mitza@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-04-12 20:42:19 +0000
committermitza <mitza@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2013-04-12 20:42:19 +0000
commit28633cc335a5076b86ed76638f4e554b82fe23de (patch)
tree0d0e020fa71944ed9f3397516388f0b5606c5b6b /CIAO/connectors/dds4ccm
parent8f39a8075fb890eaadd5d3d0d1e646f95431c553 (diff)
downloadATCD-28633cc335a5076b86ed76638f4e554b82fe23de.tar.gz
ChangeLogTag: Fri Apr 12 20:40:54 UTC 2013 Adam Mitz <mitza@ociweb.com>
Diffstat (limited to 'CIAO/connectors/dds4ccm')
-rw-r--r--CIAO/connectors/dds4ccm/impl/logger/Log_Macros.cpp2
-rw-r--r--CIAO/connectors/dds4ccm/impl/logger/Log_Macros.h12
2 files changed, 11 insertions, 3 deletions
diff --git a/CIAO/connectors/dds4ccm/impl/logger/Log_Macros.cpp b/CIAO/connectors/dds4ccm/impl/logger/Log_Macros.cpp
index 23cd7a7146e..9a053f4ca5c 100644
--- a/CIAO/connectors/dds4ccm/impl/logger/Log_Macros.cpp
+++ b/CIAO/connectors/dds4ccm/impl/logger/Log_Macros.cpp
@@ -3,3 +3,5 @@
#include "Log_Macros.h"
DDS4CCM_Logger_Export unsigned int DDS4CCM_debug_level = 0;
+
+DDS4CCM_Logger_Export ACE_Log_Category DDS4CCM_log_category ("DDS4CCM");
diff --git a/CIAO/connectors/dds4ccm/impl/logger/Log_Macros.h b/CIAO/connectors/dds4ccm/impl/logger/Log_Macros.h
index 3d4f6da0fbc..0f3ef95d096 100644
--- a/CIAO/connectors/dds4ccm/impl/logger/Log_Macros.h
+++ b/CIAO/connectors/dds4ccm/impl/logger/Log_Macros.h
@@ -12,6 +12,7 @@
// default information printed with CIAO logging messages.
#include "DDS4CCM_Logger_Export.h"
#include "ace/Log_Msg.h"
+#include "ace/Log_Category.h"
#if !defined (DDS4CCM_INFO)
# define DDS4CCM_INFO "(%P|%t) [%M] - %T - "
@@ -31,6 +32,8 @@
extern DDS4CCM_Logger_Export unsigned int DDS4CCM_debug_level;
+extern DDS4CCM_Logger_Export ACE_Log_Category DDS4CCM_log_category;
+
// By default tracing is turned off.
#if !defined (DDS4CCM_NTRACE)
# define DDS4CCM_NTRACE 1
@@ -77,7 +80,8 @@ extern DDS4CCM_Logger_Export unsigned int DDS4CCM_debug_level;
if (DDS4CCM_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___ = DDS4CCM_log_category.per_thr_obj (); \
+ if (ace___ == 0) break; \
ace___->conditional_set (__FILE__, __LINE__, -1, __ace_error); \
ace___->log X; \
} \
@@ -90,7 +94,8 @@ extern DDS4CCM_Logger_Export unsigned int DDS4CCM_debug_level;
if (DDS4CCM_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___ = DDS4CCM_log_category.per_thr_obj (); \
+ if (ace___ == 0) break; \
ace___->conditional_set (__FILE__, __LINE__, 0, __ace_error); \
ace___->log X; \
} \
@@ -140,7 +145,8 @@ extern DDS4CCM_Logger_Export unsigned int DDS4CCM_debug_level;
if (DDS4CCM_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___ = DDS4CCM_log_category.per_thr_obj (); \
+ if (ace___ == 0) break; \
ace___->conditional_set (__FILE__, __LINE__, Y, __ace_error); \
ace___->log X; \
} \