SLog in Anger: production patterns for testable and concise structured logging

The `log/slog` package has been part of the standard library since v1.21 (Aug 2023). Yet, many Go projects are still scratching the surface of its potential. Are you truly making use of all its features?

This talk moves beyond the basics of `Logger` and `Handler` to explore how `slog` transforms logging from a tedious chore into a powerful, maintainable, and testable system. We’ll quickly review `slog`'s robust stack, then dive deep into practical, production-ready patterns.

LEVEL: Intermediate

Place
Golab #1
Length
45 min
When
November 3rd, 2026
14:45

Abstract

The `log/slog` package has been part of the standard library since v1.21 (Aug 2023). Yet, many Go projects are still scratching the surface of its potential. Are you truly making use of all its features?

This talk moves beyond the basics of `Logger` and `Handler` to explore how `slog` transforms logging from a tedious chore into a powerful, maintainable, and testable system. We’ll quickly review `slog`'s robust stack, then dive deep into practical, production-ready patterns:

- Contextual Logging: Implement patterns for seamless, idiomatic contextual logging that enriches every log line without cumbersome boilerplate.

- Secure Logging & Data Masking: Implement robust strategies to prevent sensitive information from accidentally leaking into your production logs.

- Testing and Coverage: Discover techniques to add high code coverage and unit-test your logging stack to help ensure your logs are correct and concise before they ever hit production.

- Bridging the Gap: Learn how to integrate `slog` with existing logging libraries and ecosystems for a smooth migration or interoperability.

Attendees will leave this session equipped with a comprehensive collection of patterns and techniques for utilizing the powerful `slog` library, armed to make it their preferred choice for logging.

GoLab is a conference made by Develer.
Develer is a company based in Campi Bisenzio, near Florence. Our motto is : "Technology to give life to your products". We produce hardware and software to create exceptional products and to improve industrial processes and people's well being.
In Develer we have passion for the new technologies and we offer our clients effective solutions that are also efficient, simple and safe for the end users. We also believe in a friendly and welcoming environment where anybody can give their contribution. This passion and this vision are what we've been driven to organize our conference "made by developers for developers".


Subscribe to our newsletter

We hate spam just as much as you do, which is why we promise to only send you relevant communications. We respect your privacy and will never share your information with third parties.
©2026 GoLab | The international conference on Go in Italy-Design & devCantiere Creativo-Made withDatoCMS