waytale - v0.3.0
    Preparing search index...

    Class Logger

    Helper class for better logging to console. Provides some more salient visuals, filtering by log severity and inclusion or exclusion of log messages.

    This class will respect the file names and line numbers of the locations in code where the log message arised, without relying on source maps. The trick is to combine partials (bound functions) with ES class getters to redirect calls to console.*().

    If logger inclusion is specified, any log message must originate from an included logger. If no inclusion is specified, this feature is ignore. Any specified exclusion of loggers is always applied.

    Index

    Constructors

    • Create a new logger with a set identifier.

      Parameters

      • name: string

        name of the new logger

      Returns Logger

    Properties

    name: string

    Accessors

    Methods

    • Exclude a list of loggers by name.

      Parameters

      • names: string[]

        names of loggers to exclude from log output

      Returns void

    • Include a list of loggers by name.

      Parameters

      • names: string[]

        names of loggers to include in log output

      Returns void

    • Set global log severity level.

      Parameters

      • level: integer

        level to set to

      Returns void