Structured
Logs embrace the power of
machine-readable logs
HELIO MEDEIROS @helmedeiros
Slide 2
Slide 2 text
Logging: The process of
recording events during
a computer program
execution
“
Slide 3
Slide 3 text
No content
Slide 4
Slide 4 text
No content
Slide 5
Slide 5 text
web.app
{
logs
stream
past
present
Slide 6
Slide 6 text
22:55:40 INFO Initializing hub
22:55:40 INFO Starting web server
22:55:42 INFO Incoming connection from
127.0.0.1:37843
22:55:42 DEBUG Connection upgraded
22:55:42 DEBUG Receive message:
“ping”
Slide 7
Slide 7 text
>>> logging
Slide 8
Slide 8 text
log = logging.getLogger()
log.info("Starting web server”)
log.debug(“Actual memory: %s”, $mem)
Slide 9
Slide 9 text
Structured logging:
Logging events with
specific fields (key= value)
“