Class IAppenderAbstract

An appender is the actual output of log messages. For output to the console or to files, the respective subclasses shall be used.

Version

1

Hierarchy (view full)

Constructors

Properties

_buffer: LogMessage[]

A buffer that will be filled with log messages until the Appender is writable.

_filterRelation: FilterRelation

The relation, to which all the appenders results must adhere. See FilterRelation.

_filters: Filter[]

The filter that will be evaluated in order to determine whether a message shall be handled by this appender.

Accessors

Methods

  • This function does the actual appending, e.g. to the console or a file, and thus, must be overriden by subclasses. The default implementation does nothing.

    Parameters

    Returns void

  • This function forwards the message to the _appendMessage method. The function should be overridden by subclasses for the pre-processing of a log message, e.g. transforming it into a formatted string.

    Parameters

    • msg: LogMessage

      The message that shall be handled.

    Returns void

  • Clears the temporary message cache. If the appender is writable, the messages in the cache will be forwarded to the _handleMessage method.

    Returns void

  • Evaluates the message with respect to the message filters set.

    Parameters

    Returns boolean

    True, if the message matches the filters, false otherwise.

  • Returns true, if the appender is able to receive messages.

    Returns boolean

    True, if the appender is currently writable, false otherwise

  • Pushes a message to the message cache. The buffer is only intended to act as a temporary store until an appender enables its writable state.

    Parameters

    Returns void

  • Similar to receiveMessage, except the filters are not evaluated.

    Parameters

    • msg: LogMessage

      The message to receive and append.

    Returns void

  • The input function of an Appender for any log message. This function calls the filter evaluation, and hands the message over to the _handleMessage method, if the appender is currently writable. If the appender is not writable, the message is stored to the internal buffer.

    Parameters

    • msg: LogMessage

      The message that shall be received and appended.

    Returns boolean

    True, if the message was handled, false otherwise.