The plain console appender simply appends the formatted string to the console.

Version

1

TODO support console.err

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.

ageLookup: string[] = DefaultFormats.ENUMS.AGE
dayOfTheWeekLookup: string[] = DefaultFormats.ENUMS.DAY_OF_WEEK
format: string

The log message format to use. All properties of a log message can be inserted to their placeholders, e.g. '%id%'.

monthLookup: string[] = DefaultFormats.ENUMS.MONTH
noonLookup: string[] = DefaultFormats.ENUMS.NOON
separatorLookup: string[] = DefaultFormats.ENUMS.SEPARATOR
severityLookup: string[] = DefaultFormats.ENUMS.SEVERITY

A simple lookup from where the strings for the severity levels can be fetched. see DefaultFormats.ENUMS.SEVERITY

timeFormat: string

The time format to use for the %time% placeholder. The time format is inspired by https://msdn.microsoft.com/de-de/library/8kb3ddd4(v=vs.110).aspx, but some of the placeholders might not work.

Accessors

Methods

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