(file) Return to Logger.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/Logger.cpp between version 1.58 and 1.62

version 1.58, 2008/05/07 19:41:42 version 1.62, 2008/08/12 18:26:27
Line 35 
Line 35 
 #include <fstream> #include <fstream>
 #include <cstring> #include <cstring>
 #include <Pegasus/Common/Logger.h> #include <Pegasus/Common/Logger.h>
   #include <Pegasus/Common/Tracer.h>
 #include <Pegasus/Common/System.h> #include <Pegasus/Common/System.h>
 #include <Pegasus/Common/FileSystem.h> #include <Pegasus/Common/FileSystem.h>
 #include <Pegasus/Common/MessageLoader.h> #include <Pegasus/Common/MessageLoader.h>
Line 127 
Line 128 
     "PegasusTrace.log",     "PegasusTrace.log",
     "PegasusStandard.log",     "PegasusStandard.log",
     "PegasusAudit.log",     "PegasusAudit.log",
     "PegasusError.log",      "PegasusError.log"
     "PegasusDebug.log"  
 }; };
 static const char* lockFileName = "PegasusLog.lock"; static const char* lockFileName = "PegasusLog.lock";
  
Line 309 
Line 309 
     const Uint32 logComponent, // FUTURE: Support logComponent mask     const Uint32 logComponent, // FUTURE: Support logComponent mask
     Uint32 logLevel,     Uint32 logLevel,
     const String& formatString,     const String& formatString,
     const String& messageId,      const char* messageId,
     const Formatter::Arg& arg0,     const Formatter::Arg& arg0,
     const Formatter::Arg& arg1,     const Formatter::Arg& arg1,
     const Formatter::Arg& arg2,     const Formatter::Arg& arg2,
Line 335 
Line 335 
  
         // If the caller specified a messageId, then load the localized         // If the caller specified a messageId, then load the localized
         // message in the locale of the server process.         // message in the locale of the server process.
         if (messageId != String::EMPTY)          if (messageId)
         {         {
             // A message ID was specified.  Use the MessageLoader.             // A message ID was specified.  Use the MessageLoader.
             MessageLoaderParms msgParms(messageId, formatString);             MessageLoaderParms msgParms(messageId, formatString);
Line 360 
Line 360 
         }         }
 // l10n end // l10n end
  
   
        // Call the actual logging routine is in LoggerRep.        // Call the actual logging routine is in LoggerRep.
        _rep->log(logFileType, systemId, logLevel, localizedMsg);        _rep->log(logFileType, systemId, logLevel, localizedMsg);
   
          // route log message to trace too -> component LogMessages
          if (Logger::TRACE_LOG != logFileType)
          {
              // do not write log message to trace when trace facility is
              // the log to avoid double messages
              if (Tracer::TRACE_FACILITY_LOG != Tracer::getTraceFacility())
              {
                  PEG_TRACE_CSTRING(
                      TRC_LOGMSG,
                      Tracer::LEVEL1,
                      (const char*) localizedMsg.getCString());
              }
          }
     }     }
 } }
  
Line 391 
Line 404 
     if (wouldLog(logLevel))     if (wouldLog(logLevel))
     {     {
         Logger::_putInternal(logFileType, systemId, 0, logLevel,         Logger::_putInternal(logFileType, systemId, 0, logLevel,
             formatString, String::EMPTY, arg0, arg1, arg2, arg3,              formatString, 0, arg0, arg1, arg2, arg3,
             arg4, arg5, arg6, arg7, arg8, arg9);             arg4, arg5, arg6, arg7, arg8, arg9);
     }     }
 } }
Line 405 
Line 418 
     if (wouldLog(logLevel))     if (wouldLog(logLevel))
     {     {
         Logger::_putInternal(logFileType, systemId, 0, logLevel,         Logger::_putInternal(logFileType, systemId, 0, logLevel,
             formatString, String::EMPTY);              formatString, 0);
     }     }
 } }
  
Line 419 
Line 432 
     if (wouldLog(logLevel))     if (wouldLog(logLevel))
     {     {
         Logger::_putInternal(logFileType, systemId, 0, logLevel,         Logger::_putInternal(logFileType, systemId, 0, logLevel,
             formatString, String::EMPTY, arg0);              formatString, 0, arg0);
     }     }
 } }
  
Line 434 
Line 447 
     if (wouldLog(logLevel))     if (wouldLog(logLevel))
     {     {
         Logger::_putInternal(logFileType, systemId, 0, logLevel,         Logger::_putInternal(logFileType, systemId, 0, logLevel,
             formatString, String::EMPTY, arg0, arg1);              formatString, 0, arg0, arg1);
     }     }
 } }
  
Line 450 
Line 463 
     if (wouldLog(logLevel))     if (wouldLog(logLevel))
     {     {
         Logger::_putInternal(logFileType, systemId, 0, logLevel,         Logger::_putInternal(logFileType, systemId, 0, logLevel,
             formatString, String::EMPTY, arg0, arg1, arg2);              formatString, 0, arg0, arg1, arg2);
     }     }
 } }
  
Line 458 
Line 471 
     LogFileType logFileType,     LogFileType logFileType,
     const String& systemId,     const String& systemId,
     Uint32 logLevel,     Uint32 logLevel,
     const String& messageId,      const char* messageId,
     const String& formatString,      const char* formatString,
     const Formatter::Arg& arg0,     const Formatter::Arg& arg0,
     const Formatter::Arg& arg1,     const Formatter::Arg& arg1,
     const Formatter::Arg& arg2,     const Formatter::Arg& arg2,
Line 483 
Line 496 
      LogFileType logFileType,      LogFileType logFileType,
      const String& systemId,      const String& systemId,
      Uint32 logLevel,      Uint32 logLevel,
      const String& messageId,       const char* messageId,
      const String& formatString)       const char* formatString)
 { {
     if (wouldLog(logLevel))     if (wouldLog(logLevel))
     {     {
Line 497 
Line 510 
      LogFileType logFileType,      LogFileType logFileType,
      const String& systemId,      const String& systemId,
      Uint32 logLevel,      Uint32 logLevel,
      const String& messageId,       const char* messageId,
      const String& formatString,       const char* formatString,
      const Formatter::Arg& arg0)      const Formatter::Arg& arg0)
 { {
     if (wouldLog(logLevel))     if (wouldLog(logLevel))
Line 512 
Line 525 
      LogFileType logFileType,      LogFileType logFileType,
      const String& systemId,      const String& systemId,
      Uint32 logLevel,      Uint32 logLevel,
      const String& messageId,       const char* messageId,
      const String& formatString,       const char* formatString,
      const Formatter::Arg& arg0,      const Formatter::Arg& arg0,
      const Formatter::Arg& arg1)      const Formatter::Arg& arg1)
 { {
Line 528 
Line 541 
      LogFileType logFileType,      LogFileType logFileType,
      const String& systemId,      const String& systemId,
      Uint32 logLevel,      Uint32 logLevel,
      const String& messageId,       const char* messageId,
      const String& formatString,       const char* formatString,
      const Formatter::Arg& arg0,      const Formatter::Arg& arg0,
      const Formatter::Arg& arg1,      const Formatter::Arg& arg1,
      const Formatter::Arg& arg2)      const Formatter::Arg& arg2)
Line 545 
Line 558 
     LogFileType logFileType,     LogFileType logFileType,
     const String& systemId,     const String& systemId,
     const Uint32 logComponent,     const Uint32 logComponent,
     const String& formatString,      const String& message)
     const Formatter::Arg& arg0,  
     const Formatter::Arg& arg1,  
     const Formatter::Arg& arg2,  
     const Formatter::Arg& arg3,  
     const Formatter::Arg& arg4,  
     const Formatter::Arg& arg5,  
     const Formatter::Arg& arg6,  
     const Formatter::Arg& arg7,  
     const Formatter::Arg& arg8,  
     const Formatter::Arg& arg9)  
 {  
     if (wouldLog(Logger::TRACE))  
     {  
         Logger::_putInternal(logFileType, systemId, logComponent, Logger::TRACE,  
             formatString, String::EMPTY, arg0, arg1, arg2, arg3, arg4, arg5,  
             arg6, arg7, arg8, arg9);  
     }  
 }  
   
 void Logger::trace(  
     LogFileType logFileType,  
     const String& systemId,  
     const Uint32 logComponent,  
     const String& formatString)  
 {  
     if (wouldLog(Logger::TRACE))  
     {  
         Logger::_putInternal(logFileType, systemId, logComponent, Logger::TRACE,  
             formatString, String::EMPTY);  
     }  
 }  
   
 void Logger::trace(  
     LogFileType logFileType,  
     const String& systemId,  
     const Uint32 logComponent,  
     const String& formatString,  
     const Formatter::Arg& arg0)  
 {  
     if (wouldLog(Logger::TRACE))  
     {  
         Logger::_putInternal(logFileType, systemId, logComponent, Logger::TRACE,  
             formatString, String::EMPTY, arg0);  
     }  
 }  
   
 void Logger::trace(  
     LogFileType logFileType,  
     const String& systemId,  
     const Uint32 logComponent,  
     const String& formatString,  
     const Formatter::Arg& arg0,  
     const Formatter::Arg& arg1)  
 {  
     if (wouldLog(Logger::TRACE))  
     {  
         Logger::_putInternal(logFileType, systemId, logComponent, Logger::TRACE,  
             formatString, String::EMPTY, arg0, arg1);  
     }  
 }  
   
 void Logger::trace(  
     LogFileType logFileType,  
     const String& systemId,  
     const Uint32 logComponent,  
     const String& formatString,  
     const Formatter::Arg& arg0,  
     const Formatter::Arg& arg1,  
     const Formatter::Arg& arg2)  
 { {
     if (wouldLog(Logger::TRACE))     if (wouldLog(Logger::TRACE))
     {     {
         Logger::_putInternal(logFileType, systemId, logComponent, Logger::TRACE,         Logger::_putInternal(logFileType, systemId, logComponent, Logger::TRACE,
             formatString, String::EMPTY, arg0, arg1, arg2);              message, 0);
     }  
 }  
   
 void Logger::trace_l(  
     LogFileType logFileType,  
     const String& systemId,  
     const Uint32 logComponent,  
     const String& messageId,  
     const String& formatString,  
     const Formatter::Arg& arg0,  
     const Formatter::Arg& arg1,  
     const Formatter::Arg& arg2,  
     const Formatter::Arg& arg3,  
     const Formatter::Arg& arg4,  
     const Formatter::Arg& arg5,  
     const Formatter::Arg& arg6,  
     const Formatter::Arg& arg7,  
     const Formatter::Arg& arg8,  
     const Formatter::Arg& arg9)  
 {  
     if (wouldLog(Logger::TRACE))  
     {  
         Logger::_putInternal(logFileType, systemId, logComponent, Logger::TRACE,  
             formatString, messageId, arg0, arg1, arg2, arg3, arg4, arg5, arg6,  
             arg7, arg8, arg9);  
     }  
 }  
   
 void Logger::trace_l(  
     LogFileType logFileType,  
     const String& systemId,  
     const Uint32 logComponent,  
     const String& messageId,  
     const String& formatString)  
 {  
     if (wouldLog(Logger::TRACE))  
     {  
         Logger::_putInternal(logFileType, systemId, logComponent, Logger::TRACE,  
             formatString, messageId);  
     }  
 }  
   
 void Logger::trace_l(  
     LogFileType logFileType,  
     const String& systemId,  
     const Uint32 logComponent,  
     const String& messageId,  
     const String& formatString,  
     const Formatter::Arg& arg0)  
 {  
     if (wouldLog(Logger::TRACE))  
     {  
         Logger::_putInternal(logFileType, systemId, logComponent, Logger::TRACE,  
             formatString, messageId, arg0);  
     }  
 }  
   
 void Logger::trace_l(  
     LogFileType logFileType,  
     const String& systemId,  
     const Uint32 logComponent,  
     const String& messageId,  
     const String& formatString,  
     const Formatter::Arg& arg0,  
     const Formatter::Arg& arg1)  
 {  
     if (wouldLog(Logger::TRACE))  
     {  
         Logger::_putInternal(logFileType, systemId, logComponent, Logger::TRACE,  
             formatString, messageId, arg0, arg1);  
     }  
 }  
   
 void Logger::trace_l(  
     LogFileType logFileType,  
     const String& systemId,  
     const Uint32 logComponent,  
     const String& messageId,  
     const String& formatString,  
     const Formatter::Arg& arg0,  
     const Formatter::Arg& arg1,  
     const Formatter::Arg& arg2)  
 {  
     if (wouldLog(Logger::TRACE))  
     {  
         Logger::_putInternal(logFileType, systemId, logComponent, Logger::TRACE,  
             formatString, messageId, arg0, arg1, arg2);  
     }     }
 } }
  


Legend:
Removed from v.1.58  
changed lines
  Added in v.1.62

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2