Skip to main content

Overview

This example shows the smallest opt-in file logging flow with EventLog::enable(). It activates the default JSONL sink, runs one StructuredOutput request without passing a custom event bus, then reads the generated log file back and prints the captured entries on screen. Key concepts:
  • EventLog::enable(): turns on the default JSONL sink for the current process
  • StructuredOutputRuntime::fromProvider(...): uses the default runtime event bus
  • JSONL readback: parse the generated file after the request completes

Example