Class FormalAppenderAbstract

A formal appender creates a formal deserializable string from a log message.

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.

pretty: boolean

whether to generate nicely formatted output.

syntax: Syntax

The syntax for serialization to use.

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

  • 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

  • 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.