Log Better

A presentation at DeveloperWeek Austin 2019 in in Austin, TX, USA by Laura Santamaria

Abstract

Sure, we’re told actionable, parsable logs are important. But what does that mean? How has that guidance changed? Experiment with different log formats, see how machines parse logs, and discuss best practices for logging. After all, a good log helps the next person, and that might even be you.

Description

Logging is deceptively simple. You import a library, pass strings to it, and BAM you have logs. However, do you know how to write machine-parsable logs? Do you know all of the different log levels and why you need them? What does current logging best practices look like? Logging is an underutilized tool in the developer’s toolbox, and it is often misunderstood as just another unnecessary debugging tool. In reality, logging is a boon to the people who will be working on a system later down the line, and making fantastic logs really is a team sport.

For the hands-on portions of this workshop, we’ll learn and practice writing good logs, and we’ll view our practice logs. We’ll see how different logs appear in a parsing system, and we’ll experiment with different formats. Finally, we’ll see how to translate those best practices into code with a basic hello-world Python application. You just need a laptop, a terminal of some sort (anything from basic terminal to Powershell is fine), and the ability to connect to the conference wifi.

Note: You do not need to buy into LogDNA for this workshop; I just happen to work there :)

Resources

The following resources were mentioned during the presentation or are useful additional information.

Buzz and feedback

Here’s what was said about this presentation on social media.