LogMessageHandler

Description

abstract class Tinman.Core.Logging.LogMessageHandler

Derived from

ILogMessageHandler

Extended by

FormattedMessageHandler abstract

Abstract base class for ILogMessageHandler implementations.

Public / Constructors

Console


public static method Console → (1)

format opt : ILogMessageFormat = null

The log message format to use. If null, the LogMessageFormat.Default format will be used.

returns → ILogMessageHandler

The created ILogMessageHandler object.

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

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

File


public static method File → (6)

filePath in : Path

[not-null]
Path to the log file.

format opt : ILogMessageFormat = null

The log message format to use. If null, the LogMessageFormat.Default format will be used.

columns opt : int32 = 100

[>=0]
Number of columns to use for right-alignment of formatted log messages.

append opt : bool = true

true to append new log message to an existing log file, false to overwrite an existing log file.

encoding opt : CharacterEncoding = null

The character encoding to use. If null, CharacterEncodingSimple.ISO_8859_1 will be used.

lineEnding opt : LineEnding = LineEnding.Native

The line ending to use.

returns → ILogMessageHandler

The created ILogMessageHandler object.

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