Caddy.Logger (Caddy v2.3.1)
View SourceSupervisor for Caddy logging subsystem.
Collects caddy process logs from stdout and stderr and maintains a rolling buffer of up to 50,000 lines of logs.
Telemetry Integration
Automatically attaches a default handler that forwards telemetry log events to Elixir's Logger. Disable with:
config :caddy, attach_default_handler: falseConfigure log level filtering:
config :caddy, log_level: :info # Only :info and aboveUsage
# Get recent logs
logs = Caddy.Logger.tail(100)
# Listen to telemetry events
:telemetry.attach("my_handler", [:caddy, :log, :stored], fn _event, _meas, metadata, _config ->
IO.puts("Log stored: " <> metadata.message)
end, %{})