Class AbstractBasicLoggerAbstract

This abstract class specifies all methods for the creation of log messages.

Hierarchy (view full)

Implements

Constructors

Methods

  • Sets a category for the next log message. The respective log method must be called on the returned object (method chaining). The returned object allows to call more parameter specifying methods. If the returned object is withdrawn, the set category information is lost. The category of the new log message defaults to the logger's category.

    Parameters

    • category: string | Category

      The category to set for the next log message. If a Category object or a string is provided, it will be used as the actual category of the message. If a string is provided that starts with a period, e.g. '.subcategory', it will be used as a sub category of the parent logger's category. The categories will then be concatenated separated by a perios ('.').

    Returns ILogger

    The log message builder object that allows to specify more parameters of the next log message.

  • For debugging purposes.

    Parameters

    • message: string

      The actual log message.

    • Optional parameters: null | object

      The log message parameters. Its keys will replace the '%key%' placeholders in the message string.

    Returns ILogger

  • Errors due to malconfiguration of the software.

    Parameters

    • message: string

      The actual log message.

    • Optional parameters: null | object

      The log message parameters. Its keys will replace the '%key%' placeholders in the message string.

    Returns ILogger

  • Sets the next log message to be appended to the fallback appender. The respective log method must be called on the returned object (method chaining). If the returned object is withdrawn, the set fallback information is lost. This disables the evaluation of message filters to the appenders. The log framework does this internally, if errors in custom code or appenders occur.

    Parameters

    • Optional fallBack: boolean

      If true, the next message will be handled by a fallback appender.

    Returns ILogger

    The returned object allows to call more parameter specifying methods.

  • Unintended behaviour of the software, e.g. unhandled exceptions.

    Parameters

    • message: string

      The actual log message.

    • Optional parameters: null | object

      The log message parameters. Its keys will replace the '%key%' placeholders in the message string.

    Returns ILogger

  • Sets the id for the next log message. The respective log method must be called on the returned object (method chaining). The returned object allows to call more parameter specifying methods. If the returned object is withdrawn, the set id information is lost.

    Parameters

    • id: string

      The id to set for the next log message

    Returns ILogger

    The log message builder object that allows to specify more parameters of the next log message.

  • Information about the actions that are executed by the software. For User feedback.

    Parameters

    • message: string

      The actual log message.

    • Optional parameters: null | object

      The log message parameters. Its keys will replace the '%key%' placeholders in the message string.

    Returns ILogger

  • Creates a new LogMessage by calling the abstract methods in this interface.

    Parameters

    • severity: Severity

      The severity of the log message. Possible values are specified by the LogMessage.Severity Enum.

    • message: string

      The actual log message.

    • Optional parameters: null | object

      The log message parameters. Its keys will replace the '%key%' placeholders in the message string.

    Returns ILogger

  • Sets the onceId for the new log message. The respective log method must be called on the returned object (method chaining). If the returned object is withdrawn, the set fallback information is lost. If set, other messages using the same onceid will not be handled.

    Parameters

    • Optional onceId: string | boolean

      if set to true, only, the combination of loglevel, id or message text will be used for identifying similar messages

    Returns ILogger

  • Sets the origin (current environment) for the next log message. The respective log method must be called on the returned object (method chaining). The returned object allows to call more parameter specifying methods. If the returned object is withdrawn, the set origin information is lost. The origin of the new log message defaults to the logger's origin. If providing an origin that differs from the logger's origin, the strings are concatenated separated by a slash ('/')

    Parameters

    • origin: string

      The origin to set for the next log message

    Returns ILogger

    The log message builder object that allows to specify more parameters of the next log message.

  • Sets a ref fragment for the next log message. The respective log method must be called on the returned object (method chaining). The returned object allows to call more parameter specifying methods. If the returned object is withdrawn, the set ref fragment information is lost. The ref fragment of the new log message defaults to the logger's ref fragment. All fragments in the chain of loggers are concatenated separated by a colon (':')

    Parameters

    • ref: string

      The ref fragment to set for the next log message

    Returns ILogger

    The log message builder object that allows to specify more parameters of the next log message.

  • The most verbose output level.

    Parameters

    • message: string

      The actual log message.

    • Optional parameters: null | object

      The log message parameters. Its keys will replace the '%key%' placeholders in the message string.

    Returns ILogger

  • Warnings about unintended behaviour or usage of the software or possible security and safety risks.

    Parameters

    • message: string

      The actual log message.

    • Optional parameters: null | object

      The log message parameters. Its keys will replace the '%key%' placeholders in the message string.

    Returns ILogger