(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.56 and 1.71

version 1.56, 2007/09/12 21:30:58 version 1.71, 2013/04/09 05:53:13
Line 1 
Line 1 
 //%2006////////////////////////////////////////////////////////////////////////  //%LICENSE////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development  // Licensed to The Open Group (TOG) under one or more contributor license
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.  // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;  // this work for additional information regarding copyright ownership.
 // IBM Corp.; EMC Corporation, The Open Group.  // Each contributor licenses this file to you under the OpenPegasus Open
 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;  // Source License; you may not use this file except in compliance with the
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.  // License.
 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;  
 // EMC Corporation; VERITAS Software Corporation; The Open Group.  
 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;  
 // EMC Corporation; Symantec Corporation; The Open Group.  
 //  
 // Permission is hereby granted, free of charge, to any person obtaining a copy  
 // of this software and associated documentation files (the "Software"), to  
 // deal in the Software without restriction, including without limitation the  
 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or  
 // sell copies of the Software, and to permit persons to whom the Software is  
 // furnished to do so, subject to the following conditions:  
 //  
 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN  
 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED  
 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT  
 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR  
 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT  
 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN  
 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION  
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  
 // //
 //==============================================================================  // Permission is hereby granted, free of charge, to any person obtaining a
   // copy of this software and associated documentation files (the "Software"),
   // to deal in the Software without restriction, including without limitation
   // the rights to use, copy, modify, merge, publish, distribute, sublicense,
   // and/or sell copies of the Software, and to permit persons to whom the
   // Software is furnished to do so, subject to the following conditions:
   //
   // The above copyright notice and this permission notice shall be included
   // in all copies or substantial portions of the Software.
   //
   // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
   // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
   // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
   // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
   // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
   // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
   // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
   //
   //////////////////////////////////////////////////////////////////////////
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
Line 35 
Line 33 
 #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 49 
Line 48 
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
 // Maximum logfile size is defined as 32 MB = 32 * 1024 * 1024  
 # define PEGASUS_MAX_LOGFILE_SIZE 0X2000000  
  
 const Uint32 Logger::TRACE = (1 << 0); const Uint32 Logger::TRACE = (1 << 0);
 const Uint32 Logger::INFORMATION = (1 << 1); const Uint32 Logger::INFORMATION = (1 << 1);
Line 72 
Line 69 
  
 const Uint32 Logger::_NUM_LOGLEVEL = 5; const Uint32 Logger::_NUM_LOGLEVEL = 5;
  
 // Set separator  
 const char Logger::_SEPARATOR = '@';  
   
 Uint32 Logger::_severityMask; Uint32 Logger::_severityMask;
  
 Uint32 Logger::_writeControlMask = 0xF;   // Set all on by default  
  
 // Set the return codes  ///////////////////////////////////////////////////////////////////////////////
 const Boolean Logger::_SUCCESS = 1;  //
 const Boolean Logger::_FAILURE = 0;  // LoggerRep
   //
   ///////////////////////////////////////////////////////////////////////////////
   
   #if defined(PEGASUS_USE_SYSLOGS)
   
   class LoggerRep
   {
   public:
   
       LoggerRep(const String&)
       {
   # ifdef PEGASUS_OS_ZOS
           logIdentity = strdup(System::CIMSERVER.getCString());
           // If System Log is used open it
           System::openlog(logIdentity, LOG_PID, LOG_DAEMON);
   # endif
       }
   
       ~LoggerRep()
       {
   # ifdef PEGASUS_OS_ZOS
           System::closelog();
           free(logIdentity);
   # endif
       }
   
       // Actual logging is done in this routine
       void log(Logger::LogFileType,
           const String& systemId,
           Uint32 logLevel,
           const String localizedMsg)
       {
           // Log the message
           System::syslog(systemId, logLevel, localizedMsg.getCString());
       }
   
   private:
   
   # ifdef PEGASUS_OS_ZOS
       char* logIdentity;
   # endif
   };
   
   #else    // !defined(PEGASUS_USE_SYSLOGS)
  
     static const char* fileNames[] =     static const char* fileNames[] =
     {     {
         "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";
  
   /*
 /* _constructFileName prepares the absolute file name from homeDirectory      _constructFileName builds the absolute file name from homeDirectory
     and fileName.     and fileName.
   
     Today this is static.  However, it should be completely  
     configerable and driven from the config file so that  
     Log organization and names are open.  
     ATTN: rewrite this so that names, choice to do logs and  
     mask for level of severity are all driven from configuration  
     input.  
 */ */
 static CString _constructFileName( static CString _constructFileName(
     const String& homeDirectory,     const String& homeDirectory,
     const char * fileName)     const char * fileName)
 { {
     String result;     String result;
     result.reserveCapacity((Uint32)(homeDirectory.size() + 1 +      result.reserveCapacity(
         strlen(fileName)));          (Uint32)(homeDirectory.size() + 1 + strlen(fileName)));
     result.append(homeDirectory);     result.append(homeDirectory);
     result.append('/');     result.append('/');
     result.append(fileName);     result.append(fileName);
Line 123 
Line 152 
  
     LoggerRep(const String& homeDirectory)     LoggerRep(const String& homeDirectory)
     {     {
 #if !defined(PEGASUS_USE_SYSLOGS)  
         // Add test for home directory set.         // Add test for home directory set.
  
         // If home directory does not exist, create it.         // If home directory does not exist, create it.
Line 156 
Line 184 
         }         }
 #endif #endif
  
   
         _logFileNames[Logger::TRACE_LOG] = _constructFileName(homeDirectory,         _logFileNames[Logger::TRACE_LOG] = _constructFileName(homeDirectory,
                                                fileNames[Logger::TRACE_LOG]);                                                fileNames[Logger::TRACE_LOG]);
  
Line 170 
Line 197 
  
         _logFileNames[Logger::ERROR_LOG] = _constructFileName(homeDirectory,         _logFileNames[Logger::ERROR_LOG] = _constructFileName(homeDirectory,
                                                fileNames[Logger::ERROR_LOG]);                                                fileNames[Logger::ERROR_LOG]);
   
         _logFileNames[Logger::DEBUG_LOG] = _constructFileName(homeDirectory,  
                                                fileNames[Logger::DEBUG_LOG]);  
 #else  
   
 #ifdef PEGASUS_OS_ZOS  
        logIdentity = strdup(System::CIMSERVER.getCString());  
         // If System Log is used open it  
         System::openlog(logIdentity, LOG_PID, LOG_DAEMON);  
 #endif  
   
 #endif  
   
     }     }
  
     ~LoggerRep()     ~LoggerRep()
     {     {
   
 #ifdef PEGASUS_OS_ZOS  
         System::closelog();  
         free(logIdentity);  
 #endif  
     }     }
  
     // Actual logging is done in this routine     // Actual logging is done in this routine
     void log(Logger::LogFileType logFileType,     void log(Logger::LogFileType logFileType,
         const String& systemId,         const String& systemId,
         Uint32 logLevel,         Uint32 logLevel,
         const String localizedMsg)          const String &localizedMsg)
     {     {
 #if defined(PEGASUS_USE_SYSLOGS)  
   
         // Log the message  
         System::syslog(systemId, logLevel, localizedMsg.getCString());  
   
 #else  
         // Prepend the systemId to the incoming message         // Prepend the systemId to the incoming message
         String messageString(systemId);         String messageString(systemId);
         messageString.append(": ");         messageString.append(": ");
Line 234 
Line 237 
         FileSystem::getFileSize(String(_logFileNames[logFileType]),         FileSystem::getFileSize(String(_logFileNames[logFileType]),
                                        logFileSize);                                        logFileSize);
  
         // Check if the size of the logfile is exceeding 32MB.          // Check if the size of the logfile is exceeding _maxLogFileSizeBytes.
         if ( logFileSize > PEGASUS_MAX_LOGFILE_SIZE)          if ( logFileSize > _maxLogFileSizeBytes)
     {     {
             // Prepare appropriate file name based on the logFileType.             // Prepare appropriate file name based on the logFileType.
             // Eg: if Logfile name is PegasusStandard.log, pruned logfile name             // Eg: if Logfile name is PegasusStandard.log, pruned logfile name
Line 250 
Line 253 
             // info to the file name.             // info to the file name.
  
             String timeStamp = System::getCurrentASCIITime();             String timeStamp = System::getCurrentASCIITime();
             for (unsigned int i=0; i<=timeStamp.size(); i++)              for ( unsigned int i = 0; i < timeStamp.size(); i++ )
             {             {
                 if(timeStamp[i] == '/' || timeStamp[i] == ':')                 if(timeStamp[i] == '/' || timeStamp[i] == ':')
                 {                 {
Line 276 
Line 279 
         logFileStream << System::getCurrentASCIITime()         logFileStream << System::getCurrentASCIITime()
            << " " << tmp << (const char *)messageString.getCString() << endl;            << " " << tmp << (const char *)messageString.getCString() << endl;
         logFileStream.close();         logFileStream.close();
 #endif // ifndef PEGASUS_USE_SYSLOGS  
     }     }
  
       static void setMaxLogFileSize(Uint32 maxLogFileSizeBytes)
       {
           _maxLogFileSizeBytes = maxLogFileSizeBytes;
       }
 private: private:
  
 #ifdef PEGASUS_OS_ZOS  
     char* logIdentity;  
 #endif  
     CString _logFileNames[int(Logger::NUM_LOGS)];     CString _logFileNames[int(Logger::NUM_LOGS)];
   
       static Uint32 _maxLogFileSizeBytes;
 #ifndef PEGASUS_OS_VMS #ifndef PEGASUS_OS_VMS
     CString _loggerLockFileName;     CString _loggerLockFileName;
     Mutex _mutex;     Mutex _mutex;
 #endif #endif
 }; };
  
   Uint32 LoggerRep::_maxLogFileSizeBytes;
   
   #endif    // !defined(PEGASUS_USE_SYSLOGS)
   
   
   ///////////////////////////////////////////////////////////////////////////////
   //
   // Logger
   //
   ///////////////////////////////////////////////////////////////////////////////
   
 void Logger::_putInternal( void Logger::_putInternal(
     LogFileType logFileType,     LogFileType logFileType,
     const String& systemId,     const String& systemId,
     const Uint32 logComponent, // FUTURE: Support logComponent mask  
     Uint32 logLevel,     Uint32 logLevel,
     const String& formatString,      const String& message)
     const String& messageId,  
     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)  
 {  
     // Test for logLevel against severity mask to determine  
     // if we write this log.  
     if ((_severityMask & logLevel) != 0)  
     {     {
         if (!_rep)         if (!_rep)
            _rep = new LoggerRep(_homeDirectory);            _rep = new LoggerRep(_homeDirectory);
  
       // Call the actual logging routine is in LoggerRep.
       _rep->log(logFileType, systemId, logLevel, message);
  
         // l10n start      // PEP 315
         // The localized message to be sent to the system log.      // The trace can be routed into the log. The logged trace messages are
         String localizedMsg;      // logged with logFileType of Logger::TRACE_LOG.
       // To avoid a cirular writing of these messages, log messages with
         // If the caller specified a messageId, then load the localized      // logFileType of Logger::TRACE_LOG are never send to the trace.
         // message in the locale of the server process.      if (Logger::TRACE_LOG != logFileType)
         if (messageId != String::EMPTY)      {
         {          // For all other logFileType's send the log messages to the trace.
             // A message ID was specified.  Use the MessageLoader.          // But do not write log messages to trace when the trace facility is
             MessageLoaderParms msgParms(messageId, formatString);          // set to log. This avoids double messages.
             msgParms.useProcessLocale = true;          if (Tracer::TRACE_FACILITY_LOG != Tracer::getTraceFacility())
             msgParms.arg0 = arg0;          {
             msgParms.arg1 = arg1;              PEG_TRACE_CSTRING(
             msgParms.arg2 = arg2;                  TRC_LOGMSG,
             msgParms.arg3 = arg3;                  Tracer::LEVEL1,
             msgParms.arg4 = arg4;                  (const char*) message.getCString());
             msgParms.arg5 = arg5;  
             msgParms.arg6 = arg6;  
             msgParms.arg7 = arg7;  
             msgParms.arg8 = arg8;  
             msgParms.arg9 = arg9;  
   
             localizedMsg = MessageLoader::getMessage(msgParms);  
         }  
         else  
         {  // No message ID.  Use the Pegasus formatter  
               localizedMsg = Formatter::format(formatString,  
                 arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);  
         }         }
 // l10n end  
   
   
        // Call the actual logging routine is in LoggerRep.  
        _rep->log(logFileType, systemId, logLevel, localizedMsg);  
     }     }
 } }
  
Line 378 
Line 363 
 { {
     if (wouldLog(logLevel))     if (wouldLog(logLevel))
     {     {
         Logger::_putInternal(logFileType, systemId, 0, logLevel,          Logger::_putInternal(logFileType, systemId, logLevel,
             formatString, String::EMPTY, arg0, arg1, arg2, arg3,              Formatter::format(formatString, arg0, arg1, arg2, arg3,
             arg4, arg5, arg6, arg7, arg8, arg9);                  arg4, arg5, arg6, arg7, arg8, arg9));
     }     }
 } }
  
Line 392 
Line 377 
 { {
     if (wouldLog(logLevel))     if (wouldLog(logLevel))
     {     {
         Logger::_putInternal(logFileType, systemId, 0, logLevel,          Logger::_putInternal(logFileType, systemId, logLevel, formatString);
             formatString, String::EMPTY);  
     }     }
 } }
  
Line 406 
Line 390 
 { {
     if (wouldLog(logLevel))     if (wouldLog(logLevel))
     {     {
         Logger::_putInternal(logFileType, systemId, 0, logLevel,          Logger::_putInternal(logFileType, systemId, logLevel,
             formatString, String::EMPTY, arg0);              Formatter::format(formatString, arg0));
     }     }
 } }
  
Line 421 
Line 405 
 { {
     if (wouldLog(logLevel))     if (wouldLog(logLevel))
     {     {
         Logger::_putInternal(logFileType, systemId, 0, logLevel,          Logger::_putInternal(logFileType, systemId, logLevel,
             formatString, String::EMPTY, arg0, arg1);              Formatter::format(formatString, arg0, arg1));
     }     }
 } }
  
Line 437 
Line 421 
 { {
     if (wouldLog(logLevel))     if (wouldLog(logLevel))
     {     {
         Logger::_putInternal(logFileType, systemId, 0, logLevel,          Logger::_putInternal(logFileType, systemId, logLevel,
             formatString, String::EMPTY, arg0, arg1, arg2);              Formatter::format(formatString, arg0, arg1, arg2));
     }     }
 } }
  
Line 446 
Line 430 
     LogFileType logFileType,     LogFileType logFileType,
     const String& systemId,     const String& systemId,
     Uint32 logLevel,     Uint32 logLevel,
     const String& messageId,      const MessageLoaderParms& msgParms)
     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(logLevel))  
     {  
         Logger::_putInternal(logFileType, systemId, 0, logLevel,  
             formatString, messageId, arg0, arg1, arg2, arg3, arg4, arg5,  
             arg6, arg7, arg8, arg9);  
     }  
 }  
   
 void Logger::put_l(  
      LogFileType logFileType,  
      const String& systemId,  
      Uint32 logLevel,  
      const String& messageId,  
      const String& formatString)  
 { {
     if (wouldLog(logLevel))     if (wouldLog(logLevel))
     {     {
         Logger::_putInternal(logFileType, systemId, 0, logLevel,          MessageLoaderParms parms = msgParms;
         formatString, messageId);          parms.useProcessLocale = true;
     }          Logger::_putInternal(logFileType, systemId, logLevel,
 }              MessageLoader::getMessage(parms));
   
 void Logger::put_l(  
      LogFileType logFileType,  
      const String& systemId,  
      Uint32 logLevel,  
      const String& messageId,  
      const String& formatString,  
      const Formatter::Arg& arg0)  
 {  
     if (wouldLog(logLevel))  
     {  
         Logger::_putInternal(logFileType, systemId, 0, logLevel,  
             formatString, messageId, arg0);  
     }  
 }  
   
 void Logger::put_l(  
      LogFileType logFileType,  
      const String& systemId,  
      Uint32 logLevel,  
      const String& messageId,  
      const String& formatString,  
      const Formatter::Arg& arg0,  
      const Formatter::Arg& arg1)  
 {  
     if (wouldLog(logLevel))  
     {  
         Logger::_putInternal(logFileType, systemId, 0, logLevel,  
             formatString, messageId, arg0, arg1);  
     }  
 }  
   
 void Logger::put_l(  
      LogFileType logFileType,  
      const String& systemId,  
      Uint32 logLevel,  
      const String& messageId,  
      const String& formatString,  
      const Formatter::Arg& arg0,  
      const Formatter::Arg& arg1,  
      const Formatter::Arg& arg2)  
 {  
     if (wouldLog(logLevel))  
     {  
         Logger::_putInternal(logFileType, systemId, 0, logLevel,  
             formatString, messageId, arg0, arg1, arg2);  
     }  
 }  
   
 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,  
     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( void Logger::trace(
     LogFileType logFileType,     LogFileType logFileType,
     const String& systemId,     const String& systemId,
     const Uint32 logComponent,      const String& message)
     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, String::EMPTY, arg0, arg1, arg2);  
     }  
 }  
   
 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))     if (wouldLog(Logger::TRACE))
     {     {
         Logger::_putInternal(logFileType, systemId, logComponent, Logger::TRACE,          Logger::_putInternal(logFileType, systemId, Logger::TRACE,
             formatString, messageId);              message);
     }  
 }  
   
 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);  
     }     }
 } }
  
Line 703 
Line 458 
     _homeDirectory = homeDirectory;     _homeDirectory = homeDirectory;
 } }
  
 void Logger::setlogLevelMask( const String logLevelList )  void Logger::setlogLevelMask( const String &logLevelList )
 { {
     Uint32 logLevelType = 0;     Uint32 logLevelType = 0;
     String logLevelName      = logLevelList;     String logLevelName      = logLevelList;
Line 765 
Line 520 
     }     }
 } }
  
 Boolean Logger::isValidlogLevel(const String logLevel)  Boolean Logger::isValidlogLevel(const String &logLevel)
 { {
     // Validate the logLevel and modify the logLevel argument     // Validate the logLevel and modify the logLevel argument
     // to reflect the invalid logLevel     // to reflect the invalid logLevel
Line 799 
Line 554 
     else     else
     {     {
         // logLevels is empty, it is a valid value so return true         // logLevels is empty, it is a valid value so return true
         return _SUCCESS;          return true;
     }     }
  
     return validlogLevel;     return validlogLevel;
 } }
  
   #if !defined (PEGASUS_USE_SYSLOGS)
   void Logger::setMaxLogFileSize(Uint32 maxLogFileSizeBytes)
   {
        LoggerRep::setMaxLogFileSize(maxLogFileSizeBytes);
   }
   #endif
   
 PEGASUS_NAMESPACE_END PEGASUS_NAMESPACE_END


Legend:
Removed from v.1.56  
changed lines
  Added in v.1.71

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2