@beholdio/ts-lambda-api - v2.4.8
    Preparing search index...

    Class LogFactory

    Builds implementations of [[ILogger]].

    Index

    Constructors

    • Build a new log factory using application config.

      Parameters

      • appConfig: AppConfig

        Config object to read logging config from.

      • logLevel: LogLevel = LogLevel.info

        (Optional) Lowest level to log, defaults to info.

      • logFormat: LogFormat = "string"

        (Optional) Format to output log messages in, defaults to string.

      • logTimestamp: boolean = false

        (Optional) Print an ISO 8601 timestamp before every log message? (string format only, defaults to false).

      Returns LogFactory

    Methods

    • Create a new logger using custom log configuration.

      Parameters

      • clazz: Function

        The enclosing class that will use the new logger.

      • level: LogLevel = LogLevel.info
      • format: LogFormat = "string"
      • logTimestamp: boolean = false

        (Optional) Print an ISO 8601 timestamp before every log message? (string format only, defaults to false).

      Returns ILogger

    • Create a new logger using [[AppConfig]] config defaults.

      Parameters

      • clazz: Function

        The enclosing class that will use the new logger.

      Returns ILogger