Synchronize output operations. More...

Static Public Member Functions | |
| static int | init_backend (const u_long *flags=0) |
Static Public Attributes | |
| static ACE_Log_Msg_Backend * | log_backend_ = 0 |
| static ACE_Log_Msg_Backend * | custom_backend_ = 0 |
| static u_long | log_backend_flags_ = 0 |
Synchronize output operations.
Provides global point of contact for all ACE_Log_Msg instances in a process.
For internal use by ACE, only!
Definition at line 121 of file Log_Msg.cpp.
| int ACE_Log_Msg_Manager::init_backend | ( | const u_long * | flags = 0 |
) | [static] |
Definition at line 148 of file Log_Msg.cpp.
{
// If flags have been supplied, and they are different from the flags
// we had last time, then we may have to re-create the backend as a
// different type.
if (flags)
{
// Sanity check for custom backend.
if (ACE_BIT_ENABLED (*flags, ACE_Log_Msg::CUSTOM) &&
ACE_Log_Msg_Manager::custom_backend_ == 0)
{
return -1;
}
if ((ACE_BIT_ENABLED (*flags, ACE_Log_Msg::SYSLOG)
&& ACE_BIT_DISABLED (ACE_Log_Msg_Manager::log_backend_flags_, ACE_Log_Msg::SYSLOG))
|| (ACE_BIT_DISABLED (*flags, ACE_Log_Msg::SYSLOG)
&& ACE_BIT_ENABLED (ACE_Log_Msg_Manager::log_backend_flags_, ACE_Log_Msg::SYSLOG)))
{
delete ACE_Log_Msg_Manager::log_backend_;
ACE_Log_Msg_Manager::log_backend_ = 0;
}
ACE_Log_Msg_Manager::log_backend_flags_ = *flags;
}
if (ACE_Log_Msg_Manager::log_backend_ == 0)
{
ACE_NO_HEAP_CHECK;
#if (defined (WIN32) || !defined (ACE_LACKS_UNIX_SYSLOG)) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP)
// Allocate the ACE_Log_Msg_Backend instance.
if (ACE_BIT_ENABLED (ACE_Log_Msg_Manager::log_backend_flags_, ACE_Log_Msg::SYSLOG))
ACE_NEW_RETURN (ACE_Log_Msg_Manager::log_backend_,
ACE_LOG_MSG_SYSLOG_BACKEND,
-1);
else
#endif /* defined (WIN32) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) */
ACE_NEW_RETURN (ACE_Log_Msg_Manager::log_backend_,
ACE_Log_Msg_IPC,
-1);
}
return 0;
}
ACE_Log_Msg_Backend * ACE_Log_Msg_Manager::custom_backend_ = 0 [static] |
Definition at line 125 of file Log_Msg.cpp.
ACE_Log_Msg_Backend * ACE_Log_Msg_Manager::log_backend_ = 0 [static] |
Definition at line 124 of file Log_Msg.cpp.
u_long ACE_Log_Msg_Manager::log_backend_flags_ = 0 [static] |
Definition at line 127 of file Log_Msg.cpp.
1.7.0