Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "util/logger"

Index

Type aliases

LogCallback

LogCallback: (error?: any, level?: string, msg?: string, meta?: any) => void

Type declaration

    • (error?: any, level?: string, msg?: string, meta?: any): void
    • Parameters

      • Optional error: any
      • Optional level: string
      • Optional msg: string
      • Optional meta: any

      Returns void

Variables

Const logger

logger: Logger = winstonLogger

Global logger instance By default all logging to this logger will be suppressed. Call configureLogging to set up console and file transports.

Const winstonLogger

winstonLogger: Logger = winston.createLogger({level: "debug",exitOnError: false,silent: true,})

Functions

callsite

  • callsite(logInfo: TransformableInfo): TransformableInfo

Const clientFormat

  • clientFormat(info: any): string

clientLoggingConfiguration

configureLogging

  • Configure the logging sub-system with the provided LoggingConfiguration It is safe to call this method several times to re-configure the logger.

    Parameters

    Returns void

getFormat

  • getFormat(format: LoggingFormat, redact: boolean, callsites: boolean, color: boolean): Format

redirectConsoleLogging

  • redirectConsoleLogging(): void

unRedirectConsoleLogging

  • unRedirectConsoleLogging(): void

validateLevel

  • validateLevel(level: string): string

Object literals

Const ClientLogging

ClientLogging: object

Default logging configuration for running automation clients

color

color: true = true

redact

redact: true = true

console

console: object

enabled

enabled: true = true

format

format: Full = LoggingFormat.Full

level

level: string = process.env.ATOMIST_CONFIG_LOGGING_LEVEL ? process.env.ATOMIST_CONFIG_LOGGING_LEVEL : "info"

redirect

redirect: true = true

file

file: object

enabled

enabled: false = false

Const GlobalConsoleMethods

GlobalConsoleMethods: object

debug

debug: debug = console.debug

error

error: error = console.error

info

info: info = console.info

log

log: log = console.log

trace

trace: trace = console.trace

warn

warn: warn = console.warn

Const MinimalLogging

MinimalLogging: object

CLI-style logging configuration

color

color: true = true

redact

redact: true = true

console

console: object

enabled

enabled: true = true

format

format: Simple = LoggingFormat.Simple

level

level: string = "info"

redirect

redirect: false = false

file

file: object

enabled

enabled: false = false

Const NoLogging

NoLogging: object

Logging configuration suppress all logger logging

color

color: true = true

redact

redact: true = true

console

console: object

enabled

enabled: false = false

file

file: object

enabled

enabled: false = false

Const PlainLogging

PlainLogging: object

Logging configuration to simply pass through log message to the console

color

color: true = true

redact

redact: true = true

console

console: object

enabled

enabled: true = true

format

format: None = LoggingFormat.None

level

level: string = "info"

redirect

redirect: false = false

file

file: object

enabled

enabled: false = false

Generated using TypeDoc