Skip to content

Application Server Loggingλ︎

  • What to log in which environments
  • Logging levels
  • Logging as object rather than text
  • mulog

Simplistic loggingλ︎

println function sends information to the standard out and so is a very simple mechanism to create logs from specific parts of the application. This should be used sparingly and is no substitute for a specific logging framework.

println can be useful in the REPL the standard out message as well as the evaluation result (nil) are shown. println can provide additional feedback for non-terminating processes that run in the REPL, such as an application server.

Clojure WebApps application server startup via the REPL

Logging to Elastic Search / Kibanaλ︎

Log messages as objects, rather than text strings, provides greater sophistication by search tools as the messages have a structure.

Problematic Practicesλ︎

Logging to the REPL - sending lots of logs to the REPL makes the REPL much harder to use directly

Logging strings - logs entries are typically objects and far more searchable and discoverable that strings, so send objects to the logging service