#include <INet_Log.h>
Public Member Functions | |
INet_Log () | |
Static Public Member Functions | |
static unsigned int | Initializer (void) |
Static Public Attributes | |
static unsigned int | debug_level_ = INet_Log::Initializer () |
Definition at line 22 of file INet_Log.h.
ACE::INet_Log::INet_Log | ( | ) | [inline] |
Definition at line 25 of file INet_Log.h.
{}
unsigned int ACE::INet_Log::Initializer | ( | void | ) | [static] |
Definition at line 11 of file INet_Log.cpp.
{ unsigned int INet_Log::debug_level_ = INet_Log::Initializer (); unsigned int INet_Log::Initializer(void) { unsigned int debug_level = 0; bool trace = false; ACE_TString filename; ACE_Env_Value<int> log (ACE_TEXT("INET_LOG_LEVEL"), debug_level); debug_level = log; ACE_Env_Value<int> trace_env (ACE_TEXT("INET_TRACE_ENABLE"), 0); trace = (trace_env != 0); ACE_Env_Value<const ACE_TCHAR *> filename_env (ACE_TEXT("INET_LOG_FILE"), filename.c_str ()); filename = filename_env; if (trace) { INET_ENABLE_TRACE (); } else { INET_DISABLE_TRACE (); } if (filename.length () > 0) { #if defined (ACE_LACKS_IOSTREAM_TOTALLY) FILE* output_stream = ACE_OS::fopen (filename.c_str (), ACE_TEXT ("a")); ACE_LOG_MSG->msg_ostream (output_stream, 1); #else /* ! ACE_LACKS_IOSTREAM_TOTALLY */ ofstream* output_stream = 0; ACE_NEW_NORETURN (output_stream, ofstream ()); if (output_stream) { output_stream->open (ACE_TEXT_ALWAYS_CHAR (filename.c_str ()), ios::out | ios::app); if (!output_stream->bad ()) { ACE_LOG_MSG->msg_ostream (output_stream, 1); } } #endif /* ACE_LACKS_IOSTREAM_TOTALLY */ ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR | ACE_Log_Msg::LOGGER); ACE_LOG_MSG->set_flags (ACE_Log_Msg::OSTREAM);
unsigned int ACE::INet_Log::debug_level_ = INet_Log::Initializer () [static] |
Definition at line 27 of file INet_Log.h.