# IRsLogger Interface Reference

Inherits IRsObject.

List of all members.

## Public Member Functions
HRESULT | AddLogEntry ([in] RtLogEntry logEntry)
HRESULT | RegisterLogHandler ([in] IRsLogHandler *pHandler,[out] RtUlong *pHandlerId)
HRESULT | UnregisterLogHandler ([in] IRsLogHandler *pHandler)
HRESULT | FindLogHandlerById ([in] RtUlong handlerId,[out] IRsLogHandler **ppHandler)
HRESULT | HandleCriticalEntry ([in] RtLogEntry logEntry)
HRESULT | SuspendLogHandler ([in] IRsLogHandler *pHandler,[in] BOOL bSuspend)
HRESULT | SuspendLogHandlers ([in] BOOL bSuspend)

## Detailed Description

Basic event logger.

## Member Function Documentation

HRESULT IRsLogger::AddLogEntry | ( | [in] RtLogEntry | logEntry | ) |

Adds new log entry into log.

Parameters:

  | logEntry | [in] Entry to add.

HRESULT IRsLogger::RegisterLogHandler | ( | [in] IRsLogHandler * | pHandler,
|  | [out] RtUlong * | pHandlerId |
| ) |  |  |

Registers new log handler into logger.

Parameters:

  | pHandler | [in] Handler to register.
  | pHandlerId | [out] Returned id of handler (store for later use).

HRESULT IRsLogger::UnregisterLogHandler | ( | [in] IRsLogHandler * | pHandler | ) |

Unregisters existing log handler from logger.

Parameters:

  | pHandler | [in] Handler to unregister.

HRESULT IRsLogger::FindLogHandlerById | ( | [in] RtUlong | handlerId,
|  | [out] IRsLogHandler ** | ppHandler |
| ) |  |  |

Searches for log handler by specified id (id is returned by AddLogEntry).

Parameters:

  | handlerId | [in] Id of handler to search for.
  | ppHander | [out] Found handler or NULL if no handler found.

HRESULT IRsLogger::HandleCriticalEntry | ( | [in] RtLogEntry | logEntry | ) |

Handles log entry with FATAL log level.

Parameters:

  | logEntry | [in] Log entry to handle.

HRESULT IRsLogger::SuspendLogHandler | ( | [in] IRsLogHandler * | pHandler,
|  | [in] BOOL | bSuspend |
| ) |  |  |

Suspends or resumes logging into specified log handler.

Parameters:

  | pHandler | [in] Handler to suspend or resume.
  | bSuspend | [in] True if handler is suspended or false if handler is resumed.

HRESULT IRsLogger::SuspendLogHandlers | ( | [in] BOOL | bSuspend | ) |

Suspends or resumes logging into all registered log handlers.

Parameters:

  | bSuspend | [in] new status.