cAudio::cLogger Class Reference

Inheritance diagram for cAudio::cLogger:
Inheritance graph
[legend]
Collaboration diagram for cAudio::cLogger:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void logCritical (const char *sender, const char *msg,...)
 Used to log a critical error message to the logging system.
virtual void logError (const char *sender, const char *msg,...)
 Used to log an error message to the logging system.
virtual void logWarning (const char *sender, const char *msg,...)
 Used to log a warning to the logging system.
virtual void logInfo (const char *sender, const char *msg,...)
 Used to log an informational message to the logging system.
virtual void logDebug (const char *sender, const char *msg,...)
 Used to log a debug message to the logging system.
virtual const LogLevelgetLogLevel () const
 Returns the minimum log level that will be sent to the log receivers.
virtual void setLogLevel (const LogLevel &logLevel)
 Sets the minimum log level that the engine will send to log receivers.
virtual bool registerLogReceiver (ILogReceiver *receiver, const char *name)
 Register Log Receiver.
virtual void unRegisterLogReceiver (const char *name)
 Unregister a Log Receiver.
virtual bool isLogReceiverRegistered (const char *name)
 Returns whether an log receiver is currently registered.
virtual ILogReceivergetLogReceiver (const char *name)
 Returns a registered log receiver.

Protected Member Functions

void broadcastMessage (LogLevel level, const char *sender, const char *msg, va_list args)

Protected Attributes

cAudioMutex Mutex
unsigned long StartTime
char TempTextBuf [2048]
LogLevel MinLogLevel
std::map< std::string,
ILogReceiver * > 
Receivers

Detailed Description

Definition at line 17 of file cLogger.h.


Member Function Documentation

ILogReceiver * cAudio::cLogger::getLogReceiver ( const char *  name  )  [virtual]

Returns a registered log receiver.

Parameters:
name,: Name of the log receiver to return.
Returns:
Pointer to the found log receiver or NULL if it could not be found.

Implements cAudio::ILogger.

Definition at line 131 of file cLogger.cpp.

bool cAudio::cLogger::isLogReceiverRegistered ( const char *  name  )  [virtual]

Returns whether an log receiver is currently registered.

Parameters:
name,: Name of the log receiver to check for.

Implements cAudio::ILogger.

Definition at line 121 of file cLogger.cpp.

void cAudio::cLogger::logCritical ( const char *  sender,
const char *  msg,
  ... 
) [virtual]

Used to log a critical error message to the logging system.

Parameters:
sender,: Name of the class/component sending the message.
msg,: The message to send.

Implements cAudio::ILogger.

Definition at line 23 of file cLogger.cpp.

void cAudio::cLogger::logDebug ( const char *  sender,
const char *  msg,
  ... 
) [virtual]

Used to log a debug message to the logging system.

Parameters:
sender,: Name of the class/component sending the message.
msg,: The message to send.

Implements cAudio::ILogger.

Definition at line 71 of file cLogger.cpp.

void cAudio::cLogger::logError ( const char *  sender,
const char *  msg,
  ... 
) [virtual]

Used to log an error message to the logging system.

Parameters:
sender,: Name of the class/component sending the message.
msg,: The message to send.

Implements cAudio::ILogger.

Definition at line 35 of file cLogger.cpp.

void cAudio::cLogger::logInfo ( const char *  sender,
const char *  msg,
  ... 
) [virtual]

Used to log an informational message to the logging system.

Parameters:
sender,: Name of the class/component sending the message.
msg,: The message to send.

Implements cAudio::ILogger.

Definition at line 59 of file cLogger.cpp.

void cAudio::cLogger::logWarning ( const char *  sender,
const char *  msg,
  ... 
) [virtual]

Used to log a warning to the logging system.

Parameters:
sender,: Name of the class/component sending the message.
msg,: The message to send.

Implements cAudio::ILogger.

Definition at line 47 of file cLogger.cpp.

bool cAudio::cLogger::registerLogReceiver ( ILogReceiver receiver,
const char *  name 
) [virtual]

Register Log Receiver.

Note: Any class registered will become owned by the internal thread. If threading is enabled, you MUST make the receiver threadsafe if you plan to access it in your application while it is registered.

Parameters:
receiver,: Pointer to your implementation of ILogReceiver.
name,: Name of the log receiver.
Returns:
True on success, False on failure.

Implements cAudio::ILogger.

Definition at line 100 of file cLogger.cpp.

void cAudio::cLogger::setLogLevel ( const LogLevel logLevel  )  [virtual]

Sets the minimum log level that the engine will send to log receivers.

Primarily used to prevent too much verbose information from being sent to disk/console.

Parameters:
logLevel,: LogLevel to set as the new minimum. Anything equal to or greater than this level will be logged.

Implements cAudio::ILogger.

Definition at line 83 of file cLogger.cpp.

void cAudio::cLogger::unRegisterLogReceiver ( const char *  name  )  [virtual]

Unregister a Log Receiver.

Will NOT delete any user added receiver, you must do that yourself.

Parameters:
name,: Name of the log receiver to remove.

Implements cAudio::ILogger.

Definition at line 109 of file cLogger.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations

Generated on Sat Feb 20 22:55:35 2010 for cAudio by  doxygen 1.6.2