Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "util/redact"

Index

Variables

Functions

Variables

Const redactions

redactions: Array<{ redacted: RegExp; replacement: string }> = []

Functions

addRedaction

  • addRedaction(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

redact

  • redact(message: string): string

redactLog

  • redactLog(logInfo: TransformableInfo): TransformableInfo

Generated using TypeDoc