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

Diff for /pegasus/src/Pegasus/Common/Logger.h between version 1.21 and 1.29

version 1.21, 2005/10/31 16:53:08 version 1.29, 2006/11/10 18:14:58
Line 1 
Line 1 
 //%2005////////////////////////////////////////////////////////////////////////  //%2006////////////////////////////////////////////////////////////////////////
 // //
 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
Line 8 
Line 8 
 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 // EMC Corporation; VERITAS Software Corporation; The Open Group. // 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 // Permission is hereby granted, free of charge, to any person obtaining a copy
 // of this software and associated documentation files (the "Software"), to // of this software and associated documentation files (the "Software"), to
Line 27 
Line 29 
 // //
 //============================================================================== //==============================================================================
 // //
 // Author: Mike Brasher (mbrasher@bmc.com)  
 //  
 // Modified By: Dave Rosckes (rosckes@us.ibm.com)  
 //  
 //%///////////////////////////////////////////////////////////////////////////// //%/////////////////////////////////////////////////////////////////////////////
  
 #ifndef Pegasus_Logger_h #ifndef Pegasus_Logger_h
Line 42 
Line 40 
 #include <Pegasus/Common/System.h> #include <Pegasus/Common/System.h>
 #include <Pegasus/Common/MessageLoader.h> #include <Pegasus/Common/MessageLoader.h>
  
   // The Logger::trace optimization introduces the PEG_LOGGER_TRACE macro which
   // propagates branch conditions wherever it is used.  The optimization is
   // disabled for C-Cover builds so the coverage of these branches is not
   // measured.
   #ifdef PEGASUS_CCOVER
   # define PEG_LOGGER_TRACE(ARGS_LIST) \
       Logger::trace ARGS_LIST
   #else
 #define PEG_LOGGER_TRACE(ARGS_LIST) \ #define PEG_LOGGER_TRACE(ARGS_LIST) \
     do \     do \
     { \     { \
Line 51 
Line 57 
         } \         } \
     } \     } \
     while (0)     while (0)
   #endif
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
Line 66 
Line 73 
     {     {
         TRACE_LOG,         TRACE_LOG,
         STANDARD_LOG,         STANDARD_LOG,
           AUDIT_LOG, // Use only if PEGASUS_DISABLE_AUDIT_LOGGER is not defined
         ERROR_LOG,         ERROR_LOG,
         DEBUG_LOG         DEBUG_LOG
     };     };
  
     enum { NUM_LOGS = 4 };      enum { NUM_LOGS = 5 };
  
     /** Log file Level - Defines the loglevel of the log entry irrespective of     /** Log file Level - Defines the loglevel of the log entry irrespective of
         which log file it goes into. This is actually a bit mask as defined in         which log file it goes into. This is actually a bit mask as defined in
Line 97 
Line 105 
         @param Arg0 - Arg 9 - Up to 9 arguments representing the variables         @param Arg0 - Arg 9 - Up to 9 arguments representing the variables
         that go into the log entry.         that go into the log entry.
         <pre>         <pre>
         Logger::put(Logger::TRACE_LOG, "CIMServer", Logger::WARNING,          Logger::put(Logger::TRACE_LOG, System::CIMSERVER, Logger::WARNING,
             "X=$0, Y=$1, Z=$2", 88,  "Hello World", 7.5);             "X=$0, Y=$1, Z=$2", 88,  "Hello World", 7.5);
         </pre>         </pre>
     */     */
Line 155 
Line 163 
         const Formatter::Arg& arg1,         const Formatter::Arg& arg1,
         const Formatter::Arg& arg2);         const Formatter::Arg& arg2);
  
 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES  
   
     /** put_l - Puts a localized message to the defined log file     /** put_l - Puts a localized message to the defined log file
         @param logFileType - Type of log file (Trace, etc.)         @param logFileType - Type of log file (Trace, etc.)
         @param systemId  - ID of the system generating the log entry within         @param systemId  - ID of the system generating the log entry within
Line 173 
Line 179 
         @param Arg0 - Arg 9 - Up to 9 arguments representing the variables         @param Arg0 - Arg 9 - Up to 9 arguments representing the variables
         that go into the log entry.         that go into the log entry.
         <pre>         <pre>
         Logger::put(Logger::TRACE_LOG, "CIMServer", Logger::WARNING,          Logger::put(Logger::TRACE_LOG, System::CIMSERVER, Logger::WARNING,
             "X=$0, Y=$1, Z=$2", 88,  "Hello World", 7.5);             "X=$0, Y=$1, Z=$2", 88,  "Hello World", 7.5);
         </pre>         </pre>
     */     */
Line 236 
Line 242 
         const Formatter::Arg& arg1,         const Formatter::Arg& arg1,
         const Formatter::Arg& arg2);         const Formatter::Arg& arg2);
  
 #endif /* PEGASUS_USE_EXPERIMENTAL_INTERFACES */  
   
     /** Puts a message to the define log. Should only be used for trace type     /** Puts a message to the define log. Should only be used for trace type
         logs.         logs.
     */     */
Line 295 
Line 299 
         const Formatter::Arg& arg1,         const Formatter::Arg& arg1,
         const Formatter::Arg& arg2);         const Formatter::Arg& arg2);
  
 #ifdef PEGASUS_USE_EXPERIMENTAL_INTERFACES  
   
     /** Puts a localized message to the log. Should only be used     /** Puts a localized message to the log. Should only be used
         for trace type logs.         for trace type logs.
     */     */
Line 359 
Line 361 
         const Formatter::Arg& arg1,         const Formatter::Arg& arg1,
         const Formatter::Arg& arg2);         const Formatter::Arg& arg2);
  
 #endif /* PEGASUS_USE_EXPERIMENTAL_INTERFACES */  
   
     /** setHomeDirectory     /** setHomeDirectory
     */     */
     static void setHomeDirectory(const String& homeDirectory);     static void setHomeDirectory(const String& homeDirectory);
Line 393 
Line 393 
         }         }
         </pre>         </pre>
     */     */
     static bool wouldLog(Uint32 logLevel)      static Boolean wouldLog(Uint32 logLevel)
     {     {
         return _severityMask & logLevel;          return (_severityMask & logLevel) != 0;
     }     }
  
 private: private:


Legend:
Removed from v.1.21  
changed lines
  Added in v.1.29

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2