Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 1.34 KB

File metadata and controls

15 lines (10 loc) · 1.34 KB

Logging

DNS structured logs (debug): When log_severity is debug (or lower) and the DNS log file is enabled, each resolved query is logged asynchronously with dns query and fields: qname, qtype, outcome (local | cache | upstream | none | blocked), upstream (address:port when outcome is upstream, else empty), duration_ms.

Server: Logging is configured in dnsplane.json under a log section. By default logs are written to /var/log/dnsplane/ with fixed filenames: dnsserver.log, apiserver.log, and tuiserver.log. You can set:

  • log_dir – directory for log files (default: /var/log/dnsplane)
  • log_severity – minimum level: debug, info, warn, or error; or none to disable logging (no log files are created). Default is none.
  • log_rotationnone, size, or time
  • log_rotation_size_mb – max size in MB before rotation (when rotation is size)
  • log_rotation_time_days – max age in days before rotation (when rotation is time)

Rotation is checked at most every 5 minutes to avoid repeated stat calls. If writing to a log file fails, the process keeps running and the message is written to stderr.

Client: File logging is off by default. Use --log-file to enable it; you can pass a file path or a directory (in which case the file is named dnsplaneclient.log).