igcv3 - v1.1.0
    Preparing search index...

    Class Logger

    Simple Logger utility for consistent CLI output. Supports multiple log levels and configuration.

    Index

    Constructors

    Properties

    config: LoggerConfig = ...

    Methods

    • Resolves the log level based on CLI options and current configuration. Priority: Silent > Debug > LogLevel Option > Current Level

      Parameters

      • options: { silent?: boolean; debug?: boolean; logLevel?: string }
      • currentLevel: LogLevel

      Returns LogLevel

    • Apply styling to a message (color, bold, hex).

      Parameters

      • message: string

        Text to style

      • Optionaloptions: { color?: StyleColorName; bold?: boolean; hex?: string }

        Styling options

      Returns string

      Styled string with ANSI codes

    • Apply bold styling to a message.

      Parameters

      • message: string

        Text to make bold

      Returns string

      Bold string with ANSI codes

    • Format a heading (bold + color).

      Parameters

      • message: string

        Heading text

      • Optionaloptions: { color?: StyleColorName; hex?: string }

        Color options (default: blue)

      Returns string

      Styled heading string

    • Format a label (yellow text).

      Parameters

      • message: string

        Label text

      Returns string

      Yellow-styled string

    • Format a notice (yellow text, alias for label).

      Parameters

      • message: string

        Notice text

      Returns string

      Yellow-styled string

    • Format muted/secondary text (gray).

      Parameters

      • message: string

        Text to mute

      Returns string

      Gray-styled string

    • Parameters

      • colorName: string

      Returns ColorFunction

    • Log a debug message (only visible if level is DEBUG). Format: [DEBUG 🔎 TIMESTAMP] ::: message

      Parameters

      • message: string
      • ...args: unknown[]

      Returns void

    • Log an info message. Standard CLI: Icon Message Verbose/Timestamp: [INFO 📄 TIMESTAMP] ::: message

      Parameters

      • message: string

      Returns void

    • Log a success message.

      Parameters

      • message: string

      Returns void

    • Log a warning message. Outputs to stderr as warnings are diagnostic messages.

      Parameters

      • message: string

      Returns void

    • Log an error message.

      Parameters

      • message: string
      • Optionalerror: unknown

      Returns void

    • Parameters

      • level: LogLevel
      • message: string
      • colorFn: ColorFunction

      Returns string

    • Print a raw message (useful for banners or tables). Treated as INFO level - respects silent mode.

      Parameters

      • message: string

      Returns void

    • Print output data (results, tables, JSON). Always prints regardless of log level - use for user-requested data. This is different from raw() which respects silent mode.

      Parameters

      • message: string

      Returns void