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

class FileMessageHandler in Tinman.Core.Logging

An implementation of the ILogMessageHandler interface that writes log messages to a file.

sealed class FileMessageHandler extends FormattedMessageHandler

Remarks

When adding to a log message source, an instance of FileMessageHandler is redundant if another instance of FileMessageHandler using the same file path is already present in the source.

Public / Attributes

Format

The log message format.

public property Format { get }
type ILogMessageFormat
value [not-null] The log message format object.
inherited FormattedMessageHandler.Format

Public / Constructors

FileMessageHandler

Creates a new instance of FileMessageHandler.

public constructor FileMessageHandler (Path filePath, ILogMessageFormat format = null, int32 columns = 100, bool append = true, CharacterEncoding encoding = null, LineEnding lineEnding = LineEnding.Native)
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 override 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
inherited FormattedMessageHandler.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 override 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.
overrides FormattedMessageHandler.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.
inherited LogMessageHandler.Severity