Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "lib/util/logger"

Index

Type aliases

LogCallback

LogCallback: function

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 redactions

redactions: Array<object> = []

Const winstonLogger

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

Functions

addLogRedaction

  • addLogRedaction(redacted: RegExp, suggestedReplacement?: string): void
  • Prepare the logging to exclude something. If you know you're about to, say, spawn a process that will get printed to the log and will reveal something secret, then prepare the logger to exclude that secret thing.

    Pass a regular expression that will match the secret thing and very little else.

    Parameters

    • redacted: RegExp
    • Optional suggestedReplacement: string

    Returns void

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

redact

  • redact(logInfo: TransformableInfo): TransformableInfo

redirectConsoleLogging

  • redirectConsoleLogging(): void

unRedirectConsoleLogging

  • unRedirectConsoleLogging(): void

validateLevel

  • validateLevel(level: string): string

Object literals

Const ClientLogging

ClientLogging: object

Default logging configuration for running automation clients

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

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

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

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