summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ace/Log_Msg.cpp29
-rw-r--r--ace/Log_Msg.h12
2 files changed, 20 insertions, 21 deletions
diff --git a/ace/Log_Msg.cpp b/ace/Log_Msg.cpp
index 744c80b146e..7ec82e21ced 100644
--- a/ace/Log_Msg.cpp
+++ b/ace/Log_Msg.cpp
@@ -248,29 +248,28 @@ ACE_Log_Msg::instance (void)
}
#undef ACE_NEW_RETURN_I
+// Sets the flag in the default priority mask used to initialize
+// ACE_Log_Msg instances, as well as the current instance.
+
void
-ACE_Log_Msg::disable_debug_messages()
- // Clears the LM_DEBUG flag from the default priority mask used to
- // initialize ACE_Log_Msg instances, as well as the current instance.
+ACE_Log_Msg::enable_debug_messages (ACE_Log_Priority priority)
{
- default_priority_mask_ &= ~LM_DEBUG;
- ACE_Log_Msg *currentInstance = ACE_Log_Msg::instance();
- currentInstance->priority_mask(currentInstance->priority_mask()
- & ~LM_DEBUG);
+ ACE_SET_BITS (ACE_Log_Msg::default_priority_mask_, priority);
+ ACE_Log_Msg *i = ACE_Log_Msg::instance ();
+ i->priority_mask (i->priority_mask () | priority);
}
+// Clears the flag in the default priority mask used to initialize
+// ACE_Log_Msg instances, as well as the current instance.
+
void
-ACE_Log_Msg::enable_debug_messages()
- // Sets the LM_DEBUG flag in the default priority mask used to
- // initialize ACE_Log_Msg instances, as well as the current instance.
+ACE_Log_Msg::disable_debug_messages (ACE_Log_Priority priority)
{
- default_priority_mask_ |= LM_DEBUG;
- ACE_Log_Msg *currentInstance = ACE_Log_Msg::instance();
- currentInstance->priority_mask(currentInstance->priority_mask()
- | LM_DEBUG);
+ ACE_CLR_BITS (ACE_Log_Msg::default_priority_mask_, priority);
+ ACE_Log_Msg *i = ACE_Log_Msg::instance ();
+ i->priority_mask (i->priority_mask () & ~priority);
}
-
// Name of the local host.
const ASYS_TCHAR *ACE_Log_Msg::local_host_ = 0;
diff --git a/ace/Log_Msg.h b/ace/Log_Msg.h
index e1ab3591a22..0452d7b7db1 100644
--- a/ace/Log_Msg.h
+++ b/ace/Log_Msg.h
@@ -181,13 +181,13 @@ public:
static int exists (void);
// Returns non-null if an ACE_Log_Msg exists for the calling thread.
- static void disable_debug_messages();
- // Clears the LM_DEBUG flag from the default priority mask used to
- // initialize ACE_Log_Msg instances.
-
- static void enable_debug_messages();
- // Sets the LM_DEBUG flag in the default priority mask used to
+ static void disable_debug_messages (ACE_Log_Priority priority = LM_DEBUG);
+ // Clears the flag from the default priority mask used to
// initialize ACE_Log_Msg instances.
+
+ static void enable_debug_messages (ACE_Log_Priority priority = LM_DEBUG);
+ // Sets the flag in the default priority mask used to initialize
+ // ACE_Log_Msg instances.
ACE_Log_Msg (void);
// Initialize logger.