Back AAM-API documentation The AAM-Site

In file AAMLog.h:

class CAAMLog

Log facility class.

Inheritance:

CAAMLog - CAAMObject


Public Methods

[more] CAAMLog( const char* service, const eLogLevel level )
Default constructor.
[more]void GetTime( char* str )
Returns the current (local) time in the string 'str'.
[more]void InitLogFile( const char* filename )
Basic initialization.
[more]void Printf( eLogLevel level, char* message, ... )
Prints a message with the given severity level.
[more]void SetLevel( eLogLevel level )
Sets the minimum severity level.

Private Fields

[more]bool m_bFileLogging
Used to set whether file logging should be used or not
[more]static FILE* m_file_hndl
Common file handle
[more]static int m_init
Keeps track of whether the info service has been initialized
[more]eLogLevel m_level
Notify level
[more]static char* m_logfile
Common filname of the logfile.
[more]char* m_service
Name identifying the service


Inherited from CAAMObject:

Public Methods

ovoid Dump( const char* szPath ) const
ovoid FromFile( const char* szFilename )
ovoid FromFile( FILE* fh )
ovoid ToFile( FILE* fh ) const
ovoid ToFile( const char* szFilename ) const


Documentation

Log facility class. Built directly upon the CInfo class from the Verticle project by Hans P. Palbøl.

ostatic char* m_logfile
Common filname of the logfile.

ostatic FILE* m_file_hndl
Common file handle

ochar* m_service
Name identifying the service

oeLogLevel m_level
Notify level

obool m_bFileLogging
Used to set whether file logging should be used or not

ostatic int m_init
Keeps track of whether the info service has been initialized

o CAAMLog( const char* service, const eLogLevel level )

Default constructor.

Parameters:
service - Name of the calling class or function.
level - The minimum level that will be reported.
Returns:
Nothing.
Author:
Hans P. Palbøl & Mikkel B. Stegmann
Version:
3-5-2001

ovoid InitLogFile( const char* filename )

Basic initialization. Sets up the optional log file.

Parameters:
filename - The log filename. If
Returns:
Nothing.
Author:
Hans P. Palbøl & Mikkel B. Stegmann
Version:
3-5-2001

ovoid Printf( eLogLevel level, char* message, ... )

Prints a message with the given severity level.

Parameters:
level - Severity level of the incoming message.
message - Format string in printf() format.
... - Optional arguments for the printf() format string.
Returns:
Nothing.
Author:
Hans P. Palbøl & Mikkel B. Stegmann
Version:
3-5-2001

ovoid GetTime( char* str )

Returns the current (local) time in the string 'str'. Format: "hh:mm:ss".

Parameters:
str - Output string. Must be pre-allocated.
Returns:
Nothing.
Author:
Hans P. Palbøl
Version:
3-5-2001

ovoid SetLevel( eLogLevel level )

Sets the minimum severity level. All messages at this level and above are reported.

Parameters:
str - Output string. Must be pre-allocated.
Returns:
Nothing.
Author:
Hans P. Palbøl
Version:
3-5-2001


This class has no child classes.
Author:
Hans P. Palbøl & Mikkel B. Stegmann
Version:
03-05-2001

Alphabetic index Hierarchy of classes


Back AAM-API documentation The AAM-Site