version 1.25, 2006/09/01 18:00:15
|
version 1.30.2.1, 2007/11/09 18:59:30
|
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Mike Brasher (mbrasher@bmc.com) |
|
// |
|
// Modified By: Dave Rosckes (rosckes@us.ibm.com) |
|
// David Dillard, Symantec Corp. (david_dillard@symantec.com) |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#ifndef Pegasus_Logger_h | #ifndef Pegasus_Logger_h |
|
|
{ | { |
TRACE_LOG, | TRACE_LOG, |
STANDARD_LOG, | STANDARD_LOG, |
|
AUDIT_LOG, // Use only if PEGASUS_ENABLE_AUDIT_LOGGER is 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 |
|
|
@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> |
*/ | */ |
|
|
@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> |
*/ | */ |
|
|
*/ | */ |
static void setlogLevelMask(const String logLevelList); | static void setlogLevelMask(const String logLevelList); |
| |
/** setLogWriteControlMask |
|
*/ |
|
static void setLogWriteControlMask(const Uint32); |
|
|
|
/** Returns true if the given string is one of the legal log levels. | /** Returns true if the given string is one of the legal log levels. |
*/ | */ |
static Boolean isValidlogLevel(const String logLevel); | static Boolean isValidlogLevel(const String logLevel); |
|
|
static LoggerRep* _rep; | static LoggerRep* _rep; |
static String _homeDirectory; | static String _homeDirectory; |
static Uint32 _severityMask; | static Uint32 _severityMask; |
static Uint32 _writeControlMask; |
|
| |
static const char _SEPARATOR; |
|
static const Uint32 _NUM_LOGLEVEL; | static const Uint32 _NUM_LOGLEVEL; |
| |
static const Boolean _SUCCESS; |
|
static const Boolean _FAILURE; |
|
|
|
static void _putInternal( | static void _putInternal( |
LogFileType logFileType, | LogFileType logFileType, |
const String& systemId, | const String& systemId, |