Skip to main content

Logging

Logs can be persisted to the filesystem.

  • If [log] is omitted or file is empty, logs go to the terminal only
  • If file is set, logs are written to both the terminal and the file
  • The file is rotated daily; backups older than maxDays are deleted
Note

Log settings take effect only at process startup and do not support hot reload.

Example: Client​

# orbien.toml
[log]
file = "./orbien.log"
level = "info"
maxDays = 3

Example: Server​

# orbien-server.toml
[log]
file = "./orbien-server.log"
level = "info"
maxDays = 3

Parameters​

ParameterRequiredDefaultDescription
fileNoLog file path; empty means logs are not persisted
levelNoinfotrace / debug / info / warn / error
maxDaysNo3Days to keep rotated backups; 0 means never delete