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

version 1.24, 2002/10/29 22:19:55 version 1.71, 2013/04/09 05:53:13
Line 1 
Line 1 
 //%/////////////////////////////////////////////////////////////////////////////  //%LICENSE////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM,  // Licensed to The Open Group (TOG) under one or more contributor license
 // The Open Group, Tivoli Systems  // agreements.  Refer to the OpenPegasusNOTICE.txt file distributed with
   // this work for additional information regarding copyright ownership.
   // Each contributor licenses this file to you under the OpenPegasus Open
   // Source License; you may not use this file except in compliance with the
   // License.
 // //
 // Permission is hereby granted, free of charge, to any person obtaining a copy  // Permission is hereby granted, free of charge, to any person obtaining a
 // of this software and associated documentation files (the "Software"), to  // copy of this software and associated documentation files (the "Software"),
 // deal in the Software without restriction, including without limitation the  // to deal in the Software without restriction, including without limitation
 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or  // the rights to use, copy, modify, merge, publish, distribute, sublicense,
 // sell copies of the Software, and to permit persons to whom the Software is  // and/or sell copies of the Software, and to permit persons to whom the
 // furnished to do so, subject to the following conditions:  // 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.  
 // //
 //==============================================================================  // The above copyright notice and this permission notice shall be included
   // in all copies or substantial portions of the Software.
 // //
 // Author: Mike Brasher (mbrasher@bmc.com)  // 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.
 // //
 // Modified By: Sushma Fernandes (Hewlett-Packard Company)  //////////////////////////////////////////////////////////////////////////
 //              sushma_fernandes@hp.com  
 // //
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #include <iostream> #include <iostream>
 #include <fstream> #include <fstream>
 #include <cstring> #include <cstring>
 #include "Logger.h"  #include <Pegasus/Common/Logger.h>
 #include "System.h"  #include <Pegasus/Common/Tracer.h>
 #include "Destroyer.h"  #include <Pegasus/Common/System.h>
   #include <Pegasus/Common/FileSystem.h>
   #include <Pegasus/Common/MessageLoader.h>
   #include <Pegasus/Common/Executor.h>
   #include <Pegasus/Common/Mutex.h>
  
 #if defined(PEGASUS_OS_HPUX) || defined(PEGASUS_PLATFORM_LINUX_IA64_GNU)  #if defined(PEGASUS_USE_SYSLOGS)
 # include <syslog.h> # include <syslog.h>
 #endif #endif
  
Line 43 
Line 48 
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
   
 const Uint32 Logger::TRACE = (1 << 0); const Uint32 Logger::TRACE = (1 << 0);
 const Uint32 Logger::INFORMATION = (1 << 1); const Uint32 Logger::INFORMATION = (1 << 1);
 const Uint32 Logger::WARNING = (1 << 2); const Uint32 Logger::WARNING = (1 << 2);
 const Uint32 Logger::SEVERE = (1 << 3); const Uint32 Logger::SEVERE = (1 << 3);
 const Uint32 Logger::FATAL = (1 << 4); const Uint32 Logger::FATAL = (1 << 4);
  
   static char const* LOGLEVEL_LIST[] =
   {
       "TRACE",
       "INFORMATION",
       "WARNING",
       "SEVERE",
       "FATAL"
   };
   
 LoggerRep* Logger::_rep = 0; LoggerRep* Logger::_rep = 0;
 String Logger::_homeDirectory = "."; String Logger::_homeDirectory = ".";
  
 // FUTURE-SF-P3-20020517 : This may need to be configurable. At least needs  const Uint32 Logger::_NUM_LOGLEVEL = 5;
 // to be set to 0xFF by default always.  
 Uint32 Logger::_severityMask = 0xFF;      // Set all on by default  Uint32 Logger::_severityMask;
   
 Uint32 Logger::_writeControlMask = 0xF;   // Set all on by default  
   ///////////////////////////////////////////////////////////////////////////////
 /* _allocLogFileName. Allocates the name from a name set.  //
     Today this is static.  However, it should be completely  // LoggerRep
     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  #if defined(PEGASUS_USE_SYSLOGS)
     input.  
 */  class LoggerRep
 static CString _allocLogFileName(  
     const String& homeDirectory,  
     Logger::LogFileType logFileType)  
 { {
   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",
         "PegasusError.log",      "PegasusAudit.log",
         "PegasusDebug.log"      "PegasusError.log"
     };     };
   static const char* lockFileName = "PegasusLog.lock";
  
     int index = int(logFileType);  /*
       _constructFileName builds the absolute file name from homeDirectory
     if (index > Logger::NUM_LOGS)      and fileName.
         index = Logger::ERROR_LOG;  */
   static CString _constructFileName(
     const char* logFileName = fileNames[index];      const String& homeDirectory,
       const char * fileName)
   {
     String result;     String result;
     result.reserveCapacity(homeDirectory.size() + 1 + strlen(logFileName));      result.reserveCapacity(
           (Uint32)(homeDirectory.size() + 1 + strlen(fileName)));
     result.append(homeDirectory);     result.append(homeDirectory);
     result.append('/');     result.append('/');
     result.append(logFileName);      result.append(fileName);
     return result.getCString();     return result.getCString();
 } }
  
Line 99 
Line 152 
  
     LoggerRep(const String& homeDirectory)     LoggerRep(const String& homeDirectory)
     {     {
 #if !defined(PEGASUS_OS_HPUX) && !defined(PEGASUS_PLATFORM_LINUX_IA64_GNU)  
         // 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 111 
Line 163 
         // KS: I put the second test in just in case some trys to create         // KS: I put the second test in just in case some trys to create
         // a completly erronous directory.  At least we will get a message         // a completly erronous directory.  At least we will get a message
         if (!System::isDirectory(lgDir))         if (!System::isDirectory(lgDir))
             cerr << "Logging Disabled";          {
               MessageLoaderParms parms("Common.Logger.LOGGING_DISABLED",
                   "Logging Disabled");
   
               cerr << MessageLoader::getMessage(parms);
           }
  
         CString fileName = _allocLogFileName(homeDirectory, Logger::TRACE_LOG);         //Filelocks are not used for VMS
         _logs[Logger::TRACE_LOG].open(fileName, ios::app);  # if !defined(PEGASUS_OS_VMS)
           _loggerLockFileName = _constructFileName(homeDirectory, lockFileName);
   
           // Open and close a file to make sure that the file exists, on which
           // file lock is requested
           FILE *fileLockFilePointer;
           fileLockFilePointer = fopen(_loggerLockFileName, "a+");
           if(fileLockFilePointer)
           {
               fclose(fileLockFilePointer);
           }
   # endif
  
         fileName = _allocLogFileName(homeDirectory, Logger::STANDARD_LOG);          _logFileNames[Logger::TRACE_LOG] = _constructFileName(homeDirectory,
         _logs[Logger::STANDARD_LOG].open(fileName, ios::app);                                                 fileNames[Logger::TRACE_LOG]);
  
         fileName = _allocLogFileName(homeDirectory, Logger::ERROR_LOG);          _logFileNames[Logger::STANDARD_LOG] = _constructFileName(homeDirectory,
         _logs[Logger::ERROR_LOG].open(fileName, ios::app);                                                 fileNames[Logger::STANDARD_LOG]);
  
         fileName = _allocLogFileName(homeDirectory, Logger::DEBUG_LOG);  # ifdef PEGASUS_ENABLE_AUDIT_LOGGER
         _logs[Logger::DEBUG_LOG].open(fileName, ios::app);          _logFileNames[Logger::AUDIT_LOG] = _constructFileName(homeDirectory,
                                                  fileNames[Logger::AUDIT_LOG]);
 #endif #endif
  
           _logFileNames[Logger::ERROR_LOG] = _constructFileName(homeDirectory,
                                                  fileNames[Logger::ERROR_LOG]);
     }     }
  
     ostream& logOf(Logger::LogFileType logFileType)      ~LoggerRep()
       {
       }
   
       // Actual logging is done in this routine
       void log(Logger::LogFileType logFileType,
           const String& systemId,
           Uint32 logLevel,
           const String &localizedMsg)
     {     {
         int index = int(logFileType);          // Prepend the systemId to the incoming message
           String messageString(systemId);
           messageString.append(": ");
           messageString.append(localizedMsg);  // l10n
  
         if (index > int(Logger::ERROR_LOG))          // Get the logLevel String
             index = Logger::ERROR_LOG;          // This converts bitmap to string based on highest order
           // bit set
           // ATTN: KS Fix this more efficiently.
           const char* tmp = "";
           if (logLevel & Logger::TRACE) tmp =       "TRACE   ";
           if (logLevel & Logger::INFORMATION) tmp = "INFO    ";
           if (logLevel & Logger::WARNING) tmp =     "WARNING ";
           if (logLevel & Logger::SEVERE) tmp =      "SEVERE  ";
           if (logLevel & Logger::FATAL) tmp =       "FATAL   ";
   
   # ifndef PEGASUS_OS_VMS
           // Acquire AutoMutex (for thread sync)
           // and AutoFileLock (for Process Sync).
           AutoMutex am(_mutex);
           AutoFileLock fileLock(_loggerLockFileName);
   
           Uint32  logFileSize = 0;
   
           // Read logFileSize to check if the logfile needs to be pruned.
           FileSystem::getFileSize(String(_logFileNames[logFileType]),
                                          logFileSize);
   
           // Check if the size of the logfile is exceeding _maxLogFileSizeBytes.
           if ( logFileSize > _maxLogFileSizeBytes)
           {
               // Prepare appropriate file name based on the logFileType.
               // Eg: if Logfile name is PegasusStandard.log, pruned logfile name
               // will be PegasusStandard-062607-122302.log,where 062607-122302
               // is the time stamp.
               String prunedLogfile(_logFileNames[logFileType],
                                   (Uint32)strlen(_logFileNames[logFileType]) - 4);
               prunedLogfile.append('-');
   
               // Get timestamp,remove illegal chars in file name'/' and ':'
               // (: is illegal Open VMS) from the time stamp. Append the time
               // info to the file name.
  
         return _logs[index];              String timeStamp = System::getCurrentASCIITime();
               for ( unsigned int i = 0; i < timeStamp.size(); i++ )
               {
                   if( timeStamp[i] == '/' || timeStamp[i] == ':')
                   {
                       timeStamp.remove(i, 1);
                   }
               }
               prunedLogfile.append(timeStamp);
   
               // Append '.log' to the file
               prunedLogfile.append( ".log");
   
               // Rename the logfile
               FileSystem::renameFile(String(_logFileNames[logFileType]),
                                      prunedLogfile);
   
           } // Check if the logfile needs to be pruned.
   # endif  // ifndef PEGASUS_OS_VMS
   
           // Open Logfile. Based on the value of logFileType, one of the five
           // Logfiles will be opened.
           ofstream logFileStream;
           logFileStream.open(_logFileNames[logFileType], ios::app);
           logFileStream << System::getCurrentASCIITime()
              << " " << tmp << (const char *)messageString.getCString() << endl;
           logFileStream.close();
     }     }
  
       static void setMaxLogFileSize(Uint32 maxLogFileSizeBytes)
       {
           _maxLogFileSizeBytes = maxLogFileSizeBytes;
       }
 private: private:
  
     ofstream _logs[int(Logger::NUM_LOGS)];      CString _logFileNames[int(Logger::NUM_LOGS)];
   
       static Uint32 _maxLogFileSizeBytes;
   # ifndef PEGASUS_OS_VMS
       CString _loggerLockFileName;
       Mutex _mutex;
   # endif
 }; };
  
   Uint32 LoggerRep::_maxLogFileSizeBytes;
   
   #endif    // !defined(PEGASUS_USE_SYSLOGS)
   
   
   ///////////////////////////////////////////////////////////////////////////////
   //
   // Logger
   //
   ///////////////////////////////////////////////////////////////////////////////
   
   void Logger::_putInternal(
       LogFileType logFileType,
       const String& systemId,
       Uint32 logLevel,
       const String& message)
   {
       if (!_rep)
          _rep = new LoggerRep(_homeDirectory);
   
       // Call the actual logging routine is in LoggerRep.
       _rep->log(logFileType, systemId, logLevel, message);
   
       // PEP 315
       // The trace can be routed into the log. The logged trace messages are
       // logged with logFileType of Logger::TRACE_LOG.
       // To avoid a cirular writing of these messages, log messages with
       // logFileType of Logger::TRACE_LOG are never send to the trace.
       if (Logger::TRACE_LOG != logFileType)
       {
           // For all other logFileType's send the log messages to the trace.
           // But do not write log messages to trace when the trace facility is
           // set to log. This avoids double messages.
           if (Tracer::TRACE_FACILITY_LOG != Tracer::getTraceFacility())
           {
               PEG_TRACE_CSTRING(
                   TRC_LOGMSG,
                   Tracer::LEVEL1,
                   (const char*) message.getCString());
           }
       }
   }
   
   ////////////////////////////////////////////////////////////////////////////////
   //
   // Public methods start here:
   //
   ////////////////////////////////////////////////////////////////////////////////
   
 void Logger::put( void Logger::put(
     LogFileType logFileType,     LogFileType logFileType,
     const String& systemId,     const String& systemId,
     Uint32 severity,      Uint32 logLevel,
     const String& formatString,     const String& formatString,
     const Formatter::Arg& arg0,     const Formatter::Arg& arg0,
     const Formatter::Arg& arg1,     const Formatter::Arg& arg1,
Line 159 
Line 361 
     const Formatter::Arg& arg8,     const Formatter::Arg& arg8,
     const Formatter::Arg& arg9)     const Formatter::Arg& arg9)
 { {
     // Test for severity against severity mask to determine      if (wouldLog(logLevel))
     // if we write this log.  
     if ((_severityMask & severity) != 0)  
     {     {
         if (!_rep)          Logger::_putInternal(logFileType, systemId, logLevel,
            _rep = new LoggerRep(_homeDirectory);              Formatter::format(formatString, arg0, arg1, arg2, arg3,
                   arg4, arg5, arg6, arg7, arg8, arg9));
       }
   }
  
         // Get the Severity String  void Logger::put(
         // This converts bitmap to string based on highest order      LogFileType logFileType,
         // bit set      const String& systemId,
         // ATTN: KS Fix this more efficiently.      Uint32 logLevel,
         static const char* svNames[] =      const String& formatString)
         {         {
             "TRACE   ",      if (wouldLog(logLevel))
             "INFO    ",      {
             "WARNING ",          Logger::_putInternal(logFileType, systemId, logLevel, formatString);
             "SEVERE  ",      }
             "FATAL   "  }
         };  
         // NUM_LEVELS = 5  
         int sizeSvNames = sizeof(svNames) / sizeof(svNames[0]) - 1;  
   
         String logMsg = Formatter::format(formatString,  
                 arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);  
  
 #if defined(PEGASUS_OS_HPUX) || defined(PEGASUS_PLATFORM_LINUX_IA64_GNU)  void Logger::put(
             // FUTURE-SF-P3-20020517 : Use the Syslog on HP-UX. Eventually only      LogFileType logFileType,
             // certain messages will go to the Syslog and others to the      const String& systemId,
             // Pegasus Logger.      Uint32 logLevel,
             Uint32 syslogLevel = LOG_DEBUG;      const String& formatString,
       const Formatter::Arg& arg0)
             // Map the log levels.  {
             if (severity & Logger::TRACE) syslogLevel =       LOG_DEBUG;      if (wouldLog(logLevel))
             if (severity & Logger::INFORMATION) syslogLevel = LOG_INFO;      {
             if (severity & Logger::WARNING) syslogLevel =     LOG_WARNING;          Logger::_putInternal(logFileType, systemId, logLevel,
             if (severity & Logger::SEVERE) syslogLevel =      LOG_ERR;              Formatter::format(formatString, arg0));
             if (severity & Logger::FATAL) syslogLevel =       LOG_CRIT;      }
   }
             // Open the syslog.  
             // Ignore the systemId and open the log as cimserver  
             openlog("cimserver", LOG_PID|LOG_CONS, LOG_DAEMON);  
  
             // Log the message  void Logger::put(
             syslog(syslogLevel, "%s", (const char*)logMsg.getCString());      LogFileType logFileType,
       const String& systemId,
       Uint32 logLevel,
       const String& formatString,
       const Formatter::Arg& arg0,
       const Formatter::Arg& arg1)
   {
       if (wouldLog(logLevel))
       {
           Logger::_putInternal(logFileType, systemId, logLevel,
               Formatter::format(formatString, arg0, arg1));
       }
   }
  
             // Close the syslog.  void Logger::put(
             closelog();      LogFileType logFileType,
        #else      const String& systemId,
             const char* tmp = "";      Uint32 logLevel,
             if (severity & Logger::TRACE) tmp =       "TRACE   ";      const String& formatString,
             if (severity & Logger::INFORMATION) tmp = "INFO    ";      const Formatter::Arg& arg0,
             if (severity & Logger::WARNING) tmp =     "WARNING ";      const Formatter::Arg& arg1,
             if (severity & Logger::SEVERE) tmp =      "SEVERE  ";      const Formatter::Arg& arg2)
             if (severity & Logger::FATAL) tmp =       "FATAL   ";  {
                 _rep->logOf(logFileType) << System::getCurrentASCIITime()      if (wouldLog(logLevel))
                  << " " << tmp << logMsg << endl;      {
        #endif          Logger::_putInternal(logFileType, systemId, logLevel,
               Formatter::format(formatString, arg0, arg1, arg2));
       }
   }
  
   void Logger::put_l(
       LogFileType logFileType,
       const String& systemId,
       Uint32 logLevel,
       const MessageLoaderParms& msgParms)
   {
       if (wouldLog(logLevel))
       {
           MessageLoaderParms parms = msgParms;
           parms.useProcessLocale = true;
           Logger::_putInternal(logFileType, systemId, logLevel,
               MessageLoader::getMessage(parms));
     }     }
 } }
  
 void Logger::clean(const String& directory)  void Logger::trace(
       LogFileType logFileType,
       const String& systemId,
       const String& message)
   {
       if (wouldLog(Logger::TRACE))
 { {
     //String logFiles = logsDirectory;          Logger::_putInternal(logFileType, systemId, Logger::TRACE,
     //logFiles.append("/PegasusTrace.log");              message);
     //cout << "Delete logs in " << logFiles << endl;      }
     //System::removeFile(logFiles.getCString());  
     //for (i = xx; i < yy; i++)  
     //(  
     //_allocateLogFileName(directory, i)  
     //removeFile(  
     //}  
 } }
  
 void Logger::setHomeDirectory(const String& homeDirectory) void Logger::setHomeDirectory(const String& homeDirectory)
Line 238 
Line 458 
     _homeDirectory = homeDirectory;     _homeDirectory = homeDirectory;
 } }
  
   void Logger::setlogLevelMask( const String &logLevelList )
   {
       Uint32 logLevelType = 0;
       String logLevelName      = logLevelList;
   
       // Check if logLevel has been specified
       if (logLevelName != String::EMPTY)
       {
           // initialise _severityMask
           _severityMask = 0;
   
           // Set logLevelType to indicate the level of logging
           // required by the user.
           if (String::equalNoCase(logLevelName,"TRACE"))
           {
               logLevelType =  Logger::TRACE;
           }
           else if (String::equalNoCase(logLevelName,"INFORMATION"))
           {
               logLevelType =  Logger::INFORMATION;
           }
           else if (String::equalNoCase(logLevelName,"WARNING"))
           {
               logLevelType = Logger::WARNING;
           }
           else if (String::equalNoCase(logLevelName,"SEVERE"))
           {
               logLevelType = Logger::SEVERE;
           }
           else if (String::equalNoCase(logLevelName,"FATAL"))
           {
               logLevelType = Logger::FATAL;
           }
           // Setting _severityMask.  NOTE:  When adding new logLevels
           // it is essential that they are adding in ascending order
           // based on priority.  Once a case statement is true we will
           // continue to set all following log levels with a higher
           // priority.
           switch(logLevelType)
           {
               case Logger::TRACE:
                     _severityMask |= Logger::TRACE;
               case Logger::INFORMATION:
                     _severityMask |= Logger::INFORMATION;
               case Logger::WARNING:
                     _severityMask |= Logger::WARNING;
               case Logger::SEVERE:
                     _severityMask |= Logger::SEVERE;
               case Logger::FATAL:
                     _severityMask |= Logger::FATAL;
           }
   
           Executor::updateLogLevel(logLevelName.getCString());
       }
       else
       {
           // Property logLevel not specified, set default value.
           _severityMask = ~Logger::TRACE;
           Executor::updateLogLevel("INFORMATION");
       }
   }
   
   Boolean Logger::isValidlogLevel(const String &logLevel)
   {
       // Validate the logLevel and modify the logLevel argument
       // to reflect the invalid logLevel
   
       Uint32    index=0;
       String    logLevelName = String::EMPTY;
       Boolean   validlogLevel=false;
   
       logLevelName = logLevel;
   
       if (logLevelName != String::EMPTY)
       {
           // Lookup the index for logLevel name in _logLevel_LIST
           index = 0;
           validlogLevel = false;
   
           while (index < _NUM_LOGLEVEL)
           {
               if (String::equalNoCase(logLevelName, LOGLEVEL_LIST[index]))
               {
                   // Found logLevel, break from the loop
                   validlogLevel = true;
                   break;
               }
               else
               {
                   index++;
               }
           }
       }
       else
       {
           // logLevels is empty, it is a valid value so return true
           return true;
       }
   
       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.24  
changed lines
  Added in v.1.71

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2