Collaboration diagram for ACE_Log_Msg_Manager:

Static Public Member Functions | |
| int | init_backend (const u_long *flags=0) |
Static Public Attributes | |
| ACE_Log_Msg_Backend * | log_backend_ = 0 |
| ACE_Log_Msg_Backend * | custom_backend_ = 0 |
| u_long | log_backend_flags_ = 0 |
Provides global point of contact for all ACE_Log_Msg instances in a process.
For internal use by ACE, only!
Definition at line 125 of file Log_Msg.cpp.
|
|
Definition at line 150 of file Log_Msg.cpp. References ACE_BIT_DISABLED, ACE_BIT_ENABLED, ACE_LOG_MSG_SYSLOG_BACKEND, ACE_NEW_RETURN, ACE_NO_HEAP_CHECK, custom_backend_, log_backend_, and log_backend_flags_. Referenced by ACE_Log_Msg::instance().
00151 {
00152 // If flags have been supplied, and they are different from the flags
00153 // we had last time, then we may have to re-create the backend as a
00154 // different type.
00155 if (flags)
00156 {
00157 // Sanity check for custom backend.
00158 if (ACE_BIT_ENABLED (*flags, ACE_Log_Msg::CUSTOM) &&
00159 ACE_Log_Msg_Manager::custom_backend_ == 0)
00160 {
00161 return -1;
00162 }
00163
00164 if ((ACE_BIT_ENABLED (*flags, ACE_Log_Msg::SYSLOG)
00165 && ACE_BIT_DISABLED (ACE_Log_Msg_Manager::log_backend_flags_, ACE_Log_Msg::SYSLOG))
00166 || (ACE_BIT_DISABLED (*flags, ACE_Log_Msg::SYSLOG)
00167 && ACE_BIT_ENABLED (ACE_Log_Msg_Manager::log_backend_flags_, ACE_Log_Msg::SYSLOG)))
00168 {
00169 delete ACE_Log_Msg_Manager::log_backend_;
00170 ACE_Log_Msg_Manager::log_backend_ = 0;
00171 }
00172
00173 ACE_Log_Msg_Manager::log_backend_flags_ = *flags;
00174 }
00175
00176 if (ACE_Log_Msg_Manager::log_backend_ == 0)
00177 {
00178 ACE_NO_HEAP_CHECK;
00179
00180 #if (defined (WIN32) || !defined (ACE_LACKS_UNIX_SYSLOG)) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP)
00181 // Allocate the ACE_Log_Msg_Backend instance.
00182 if (ACE_BIT_ENABLED (ACE_Log_Msg_Manager::log_backend_flags_, ACE_Log_Msg::SYSLOG))
00183 ACE_NEW_RETURN (ACE_Log_Msg_Manager::log_backend_,
00184 ACE_LOG_MSG_SYSLOG_BACKEND,
00185 -1);
00186 else
00187 #endif /* defined (WIN32) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP) */
00188 ACE_NEW_RETURN (ACE_Log_Msg_Manager::log_backend_,
00189 ACE_Log_Msg_IPC,
00190 -1);
00191 }
00192
00193 return 0;
00194 }
|
|
|
Definition at line 146 of file Log_Msg.cpp. Referenced by init_backend(). |
|
|
Definition at line 145 of file Log_Msg.cpp. Referenced by init_backend(). |
|
|
Definition at line 148 of file Log_Msg.cpp. Referenced by init_backend(). |
1.3.6