Skip to main content

LoggingEventListener

Logs octo's event stream to the terminal. This is what turns a silent run into a readable one.

Enable it in octo.yml under settings.listeners, where level and colorize are optional:

settings:
listeners:
- type: LoggingEventListener
level: info

Levels, each including the ones above it:

  • error - a mode failed.
  • warn - drift, commit warnings, a non-zero terraform exit.
  • info - mode boundaries, folders written, terraform commands and every line they print, mode results, SDK resource actions, author log() calls, and the mode's report in full.
  • debug - diffs, transactions, serialization, hooks, terraform processes starting and exiting.

The JSON a terraform process asked for JSON prints is data octo reads, and is never printed.

  • trace - class registration.
@group

Event Listeners

Index

Constructors

constructor

  • Parameters

    • logger: Logger

      The process logger, whose level and destination this listener owns.

    Returns LoggingEventListener

Methods

onAction

  • onAction(event: ActionEvent): void
  • An author's own log() call from inside an action.


    Parameters

    • event: ActionEvent

    Returns void

onHook

  • onHook(event: HookEvent): void
  • A registered hook callback finished.


    Parameters

    • event: HookEvent

    Returns void

onMode

  • onMode(event: ModeEvent): void
  • Mode boundaries, and the only path by which a mode failure reaches a listener.


    Parameters

    • event: ModeEvent

    Returns void

onModeResult

  • onModeResult(event: ModeResultEvent<unknown>): void
  • What a mode concluded.


    Parameters

    • event: ModeResultEvent<unknown>

    Returns void

onModule

  • onModule(event: ModuleEvent): void
  • A module was applied.


    Parameters

    • event: ModuleEvent

    Returns void

onRegistration

  • onRegistration(event: RegistrationEvent): void
  • A decorated class registered itself at boot.


    Parameters

    • event: RegistrationEvent

    Returns void

onSerialization

  • onSerialization(event: SerializationEvent<unknown>): Promise<void>
  • State was read or written.


    Parameters

    • event: SerializationEvent<unknown>

    Returns Promise<void>

onTerraform

  • onTerraform(event: TerraformEvent<unknown>): void
  • Terragrunt folder writes, and terraform commands with their duration.


    Parameters

    • event: TerraformEvent<unknown>

    Returns void

onTransaction

  • onTransaction(event: TransactionEvent<any>): void
  • The diffs, the transaction built from them, and each resource action as it runs.


    Parameters

    • event: TransactionEvent<any>

    Returns void