DEV Community

Francesco
Francesco

Posted on • Updated on

Clojure Bites - Structured logging with mulog

Full post here

Looking forward your comments!

Overview

Logging is a fundamental tool to monitor and debug a running system.
Even if we can use logs to gather metrics about our system, these are
often written with the assumption that humans are going to consume them,
which make it hard to extract meaning information from log messages.

Log messages are rarely consistent or even meaningful if read few days
after writing them during your emergency debug session. Writing good log
messages is hard! Almost as hard as naming things and cache invalidation.

Another overlooked problem is that often logs are are context less, what
can we infer by a message like "Failed to process user payment" if we don't
know what triggered the payment process, the affected user or product?

Structured logging

Structured logging aims to provide query-able, consistent, information rich
logs that can be used for:

  • Business intelligence: derive business relevant data from logged events
  • Monitoring: understand the current state of a system
  • Debugging: understand the context in which an error has been reported

Top comments (0)