(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.47 and 1.51

version 1.47, 2006/11/08 20:38:30 version 1.51, 2007/02/06 19:07:10
Line 36 
Line 36 
 #include <cstring> #include <cstring>
 #include "Logger.h" #include "Logger.h"
 #include "System.h" #include "System.h"
 #include <Pegasus/Common/MessageLoader.h> //l10n  #include <Pegasus/Common/MessageLoader.h>
  
 #if defined(PEGASUS_USE_SYSLOGS) #if defined(PEGASUS_USE_SYSLOGS)
 # include <syslog.h> # include <syslog.h>
Line 100 
Line 100 
  
     int index = int(logFileType);     int index = int(logFileType);
  
     if (index > Logger::NUM_LOGS)      if (index >= Logger::NUM_LOGS)
         index = Logger::ERROR_LOG;         index = Logger::ERROR_LOG;
  
     const char* logFileName = fileNames[index];     const char* logFileName = fileNames[index];
  
     String result;     String result;
     result.reserveCapacity(homeDirectory.size() + 1 + strlen(logFileName));      result.reserveCapacity((Uint32)(homeDirectory.size() + 1 +
           strlen(logFileName)));
     result.append(homeDirectory);     result.append(homeDirectory);
     result.append('/');     result.append('/');
     result.append(logFileName);     result.append(logFileName);
Line 130 
Line 131 
  
         // 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))
            //l10n          {
            //cerr << "Logging Disabled";  
            MessageLoaderParms parms("Common.Logger.LOGGING_DISABLED",            MessageLoaderParms parms("Common.Logger.LOGGING_DISABLED",
                "Logging Disabled");                "Logging Disabled");
  
Line 158 
Line 158 
 #else #else
  
 #ifdef PEGASUS_OS_ZOS #ifdef PEGASUS_OS_ZOS
        logIdendity = System::CIMSERVER.getCString();         logIdentity = strdup(System::CIMSERVER.getCString());
         // If System Log is used open it         // If System Log is used open it
         System::openlog(logIdendity, LOG_PID, LOG_DAEMON);          System::openlog(logIdentity, LOG_PID, LOG_DAEMON);
 #endif #endif
  
 #endif #endif
Line 184 
Line 184 
  
 #ifdef PEGASUS_OS_ZOS #ifdef PEGASUS_OS_ZOS
         System::closelog();         System::closelog();
           free(logIdentity);
 #endif #endif
  
 #endif #endif
Line 204 
Line 204 
 private: private:
  
 #ifdef PEGASUS_OS_ZOS #ifdef PEGASUS_OS_ZOS
     CString logIdendity;      char* logIdentity;
 #endif #endif
     ofstream _logs[int(Logger::NUM_LOGS)];     ofstream _logs[int(Logger::NUM_LOGS)];
 }; };
Line 212 
Line 212 
 void Logger::_putInternal( void Logger::_putInternal(
     LogFileType logFileType,     LogFileType logFileType,
     const String& systemId,     const String& systemId,
     const Uint32 logComponent, // TODO: Support logComponent mask in future release      const Uint32 logComponent, // FUTURE: Support logComponent mask
     Uint32 logLevel,     Uint32 logLevel,
     const String& formatString,     const String& formatString,
     const String& messageId,  // l10n      const String& 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,


Legend:
Removed from v.1.47  
changed lines
  Added in v.1.51

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2