TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class LogMessageHandler in Tinman.Core.Logging

Abstract base class for ILogMessageHandler implementations.

abstract class LogMessageHandler implements ILogMessageHandler
  base of FormattedMessageHandler

Public / Constructors

Console

Creates a new instance of ILogMessageHandler that outputs log messages to the console resp. the standard output stream..

public static method Console (ILogMessageFormat format = null)
type ILogMessageHandler
params format The log message format to use. If null, the Default format will be used. Defaults to null.

Remarks:

When adding to a log message source, the returned console handler is redundant if another console handler is already present in the source.

File

Creates a new instance of ILogMessageHandler that outputs log messages to the given file.

public static method File (Path filePath, ILogMessageFormat format = null, int32 columns = 100, bool append = true, CharacterEncoding encoding = null, LineEnding lineEnding = LineEnding.Native)
type ILogMessageHandler
params filePath [not-null] Path to the log file.
  format The log message format to use. If null, the Default format will be used. Defaults to null.
  columns [>=0] Number of columns to use for right-alignment of formatted log messages. Defaults to 100.
  append true to append new log message to an existing log file, false to overwrite an existing log file. Defaults to true.
  encoding The character encoding to use. If null, ISO_8859_1 will be used. Defaults to null.
  lineEnding The line ending to use. Defaults to Native.

Public / Methods

HandleLogMessage

Handles the given log message.

public abstract method HandleLogMessage (ILogger source, LogSeverity logSeverity, string logMessage)
params source [not-null] The ILogger that has been used to emit the log message.
  logSeverity The LogSeverity of the log message.
  logMessage [not-null] The log message
implements ILogMessageHandler.HandleLogMessage

Remarks:

All exceptions that are thrown by implementing methods are dropped silently.

IsRedundant

Checks if this log message handler is redundant if the given one is already present.

public abstract method IsRedundant (ILogMessageHandler other)
type bool
params other [not-null] The other handler.
returns true if this log message handler is redundant, false if not.
implements ILogMessageHandler.IsRedundant

Severity

Changes the maximum log severity of this handler.

public virtual method Severity (LogSeverity severity)
type ILogMessageHandler
params severity The new maximum log severity.
returns [not-null] The resulting log message handler.
implements ILogMessageHandler.Severity