logging¶
The logging section controls gateway log verbosity and output format.
Fields¶
| Field | Type | Default | Notes |
|---|---|---|---|
level |
string | info |
trace, debug, info, warn, error, fatal, panic, or disabled |
format |
string | console |
console or json |
Values are normalized case-insensitively. Unknown levels or formats are rejected during startup and hot reload instead of silently falling back to another logging mode.
level is applied during hot reload. format selects the process-wide writer at startup and therefore requires a gateway restart when changed. The gateway logs a restart-required warning instead of replacing the global writer while requests are active.
The --log-level command-line option has precedence over the YAML value for the full process lifetime, including after config reloads. An invalid command-line level fails startup.
Example¶
Practical guidance¶
- Use
consolefor local development. - Use
jsonwhen logs feed into a collector or central logging stack. - Be careful with
debugin production because request-path logs get noisier very quickly. - Restart the gateway after changing
format; changing onlyleveldoes not require a restart.