Context
The console output formatter provides color-coded ANSI terminal output for live monitoring of the EVM indexer. Each event type has a distinct color tag for quick visual scanning. It can be toggled via the `CONSOLE_LOG` environment variable, except for block output which is always shown.
Specification
- Layer: Infrastructure (`infrastructure/console/EvmConsoleOutputFormatter.java`)
- Color-coded tags:
- `[BLOCK]` — cyan bold: `Block: N (txs: M, gas: G%)`
- `[TX]` — red: failed transaction
- `[TX]` — white: normal successful transaction
- `[TRANSFER]` — yellow bold: native transfer above threshold
- `[ERC20]` — magenta bold: ERC-20 Transfer event
- `[REORG]` — red bold: chain reorganization event
- Truncation rules:
- Transaction hash > 20 chars: display as `first8...last8`
- Address > 16 chars: display as `first8...last8`
- Toggle: Other output controlled by `CONSOLE_LOG` environment variable
- Block tag (`[BLOCK]`) always shown regardless of `CONSOLE_LOG` setting (not gated by the toggle). This matches FR-13 in the functional spec: "Block summaries always shown (not gated by CONSOLE_LOG)".
- Gas percentage: Computed as `(gasUsed / gasLimit) * 100`
Acceptance Criteria
Dependencies
- EVM-12: EvmTransaction domain model (source data for formatting)
References
Context
The console output formatter provides color-coded ANSI terminal output for live monitoring of the EVM indexer. Each event type has a distinct color tag for quick visual scanning. It can be toggled via the `CONSOLE_LOG` environment variable, except for block output which is always shown.
Specification
Acceptance Criteria
Dependencies
References