summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Mitz <mitza-oci@users.noreply.github.com>2013-04-12 20:42:19 +0000
committerAdam Mitz <mitza-oci@users.noreply.github.com>2013-04-12 20:42:19 +0000
commit9dad5b6f8931af84496dd823e55aa8e7da966af9 (patch)
tree0d0e020fa71944ed9f3397516388f0b5606c5b6b
parent7ed4c35791a42d06517bac24022cdfad50f775f4 (diff)
downloadATCD-9dad5b6f8931af84496dd823e55aa8e7da966af9.tar.gz
ChangeLogTag: Fri Apr 12 20:40:54 UTC 2013 Adam Mitz <mitza@ociweb.com>
-rw-r--r--CIAO/ChangeLog9
-rw-r--r--CIAO/ciao/Logger/Log_Macros.cpp1
-rw-r--r--CIAO/ciao/Logger/Log_Macros.h13
-rw-r--r--CIAO/connectors/dds4ccm/impl/logger/Log_Macros.cpp2
-rw-r--r--CIAO/connectors/dds4ccm/impl/logger/Log_Macros.h12
5 files changed, 31 insertions, 6 deletions
diff --git a/CIAO/ChangeLog b/CIAO/ChangeLog
index 76344643d06..b3eae290ace 100644
--- a/CIAO/ChangeLog
+++ b/CIAO/ChangeLog
@@ -1,3 +1,12 @@
+Fri Apr 12 20:40:54 UTC 2013 Adam Mitz <mitza@ociweb.com>
+
+ * ciao/Logger/Log_Macros.h:
+ * ciao/Logger/Log_Macros.cpp:
+ * connectors/dds4ccm/impl/logger/Log_Macros.h:
+ * connectors/dds4ccm/impl/logger/Log_Macros.cpp:
+
+ Use distinct ACE Log Categories for both CIAO and DDS4CCM.
+
Thu Apr 11 06:49:15 UTC 2013 Johnny Willemsen <jwillemsen@remedy.nl>
* connectors/dds4ccm/impl/DDS_Listen_T.h:
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; \
} \
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; \
} \