Skip to content

Old manual

You are reading the reference manual of an older release. Read the current manual »

Logging

ContainerSSH comes with configurable logging facilities. At this time only JSON logging is supported, but the log level can be configured.

The configuration can be done from the config file:

log:
  level: "warning"

Tip

You can configure the log level on a per-user basis using the configuration server.

The supported levels are in accordance with the Syslog standard:

  • debug
  • info
  • notice
  • warning
  • error
  • crit
  • alert
  • emerg

Note

In case of a fatal application crash (panic), the crash log will end up on the stderr. Make sure to capture that as well for emergency debugging.

The JSON log format

The JSON log format outputs one line to the output per message. The message format is:

{
  "timestamp":"Timestamp in RFC3339 format",
  "level":"the log level",
  "message":"the message (optional)",
  "details": {
    "the detail object if any (optional)"
  }
}

Note

The JSON logger writes to the standard output regardless of log level.

Note

In case of a fatal application crash (panic), the crash log will end up on the stderr. Make sure to capture that as well for emergency debugging.