Structured Application Logging

In addition to filtering existing log events from our applications and services we can also add structured logging to our applications. With structured logs we provide additional context or information about a situation, or highlight that something has occurred. An example of this is a stack trace generated when an error occurs. For diagnostic purposes log entries are hugely useful. There are two ways of deducing useful data from logs:

  • Creating structured log entries at strategic points of our application.
  • Consuming existing log data.

We're going to look at both methods, starting with adding our own log entries.

Application logging primer

Let's look at some basic tenets for application logging. Firstly, in ...

Get The Logstash Book now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.