Production Kong Log level

Thanks for sharing your experience @jeremyjpj0916. As an additional recommendation, I would also strongly suggest not setting the log level higher than error, possibly even warn.

A few notes on how Kong uses those logging levels:

  • debug: debugging info about the plugins runloop and each individual plugin or other components. Very chatty like Jeremy said, but useful when debugging, e.g. is plugin xyz running?
  • info/notice: informational log about normal behavior, can mostly be ignored. Kong does not make a big difference between both of these levels (although syslog(2) does).
  • warn: abnormal behavior, not resulting in dropped transactions, but should be investigated.
  • error: an error that resulted in a request being dropped. The client probably received an HTTP 500 response or similar. Monitoring the rate of these logs is important, as they can happen occasionally, but an abnormally high rate of error logs can mean that something is wrong and a large number of clients are suffering from it.
  • crit: Kong is operating in critical conditions; it most likely isn’t working properly and a large number of clients are suffering from it. This log level warrants waking somebody up from your team.

Kong does not make use of alert and emerg, although we are thinking of moving some crit messages to alert, to better reflect log messages upon which action must be immediately taken).

To conclude, using log_level = notice is the default, recommended setting. If too chatty, bump it to warn, but ideally not higher :slight_smile:

1 Like