OINO TS
    Preparing search index...

    Class OINOLogAbstract

    Abstract base class for logging implementations supporting

    • error, warning, info and debug channels
    • setting level of logs outputted

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Log debug event. Debug events are prettyprinted.

      Parameters

      • domain: string

        domain of the log event

      • channel: string

        channel of the log event

      • method: string

        method of the log event

      • message: string

        message of the log event

      • Optionaldata: any

        structured data associated with the log event

      Returns void

    • Log error event. Error events are printed as a single line.

      Parameters

      • domain: string

        domain of the log event

      • channel: string

        channel of the log event

      • method: string

        method of the log event

      • message: string

        message of the log event

      • Optionaldata: any

        structured data associated with the log event

      Returns void

    • Log exception event. Exception events are prettyprinted and preserve newlines so that stack traces are readable.

      Parameters

      • domain: string

        domain of the log event

      • channel: string

        channel of the log event

      • method: string

        method of the log event

      • message: string

        message of the log event

      • Optionaldata: any

        structured data associated with the log event

      Returns void

    • Get current log levels as an array of objects with domain, channel, method and level.

      Returns any[]

    • Import log levels from an array of objects with domain, channel, method and level resetting existing values (i.e. non-existing values get removed).

      Parameters

      • logLevels: any[]

        array of log level objects

      Returns void

    • Log info event. Info events are printed as a single line.

      Parameters

      • domain: string

        domain of the log event

      • channel: string

        channel of the log event

      • method: string

        method of the log event

      • message: string

        message of the log event

      • Optionaldata: any

        structured data associated with the log event

      Returns void

    • Set log level for given combination of domain/channel/method. Not defining dimension(s) means they match any value. Multiple settings can be combined to set different logging accuracy specifically

      For example: logLevel: warning, domain: *, channel: , method: * will only output error events. logLevel: debug, domain: d1, channel: c1, method: "" will enable debug events for channel c1 of domain d1. logLevel: info, domain: d1, channel: c1, method: m1 will supress debug events for method m1.

      Parameters

      • logLevel: OINOLogLevel

        log level to use

      • domain: string = ""

        domain of the log event (default: "*" for all)

      • channel: string = ""

        channel of the log event (default: "*" for all)

      • method: string = ""

        method of the log event (default: "*" for all)

      Returns void

    • Set log levels from an array of objects with domain, channel, method and level overwriting existing values (i.e. non-existing values are not affected).

      Parameters

      • logLevels: any[]

        array of log level objects

      Returns void

    • Log warning event. Warning events are printed as a single line.

      Parameters

      • domain: string

        domain of the log event

      • channel: string

        channel of the log event

      • method: string

        method of the log event

      • message: string

        message of the log event

      • Optionaldata: any

        structured data associated with the log event

      Returns void