An exploration of the two-tiered architecture of Go's log/slog package, comparing it to the database/sql driver pattern. The package separates the slog.Logger (consumed by applications) from the slog.Handler interface (implemented by custom backends), following a ports-and-adapters (hexagonal) architecture. The post introduces how these two interfaces interact and sets the stage for a series on writing custom slog handlers.

2m read timeFrom boldlygo.tech
Post cover image
1 Impression