TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: dazl – the Go logging framework of frameworks

9 pointsby kuujoabout 2 years ago
A few years ago, my team moved from Java to Go. Working on Go projects, we came across a variety of logging frameworks with different APIs outputting messages in different formats. Go seemed to be lacking a logging abstraction like slf4j, which has been so invaluable to the Java ecosystem. Without that abstraction layer, the APIs for configuring logging vary wildly across projects, and libraries must either add a dependency on one of those frameworks or simply avoid structured logging altogether.<p>Dazl is a logging abstraction layer that decouples the logging API from specific Go logging libraries, providing a pluggable logging backend with support for popular frameworks like zap and zerolog. Add logging to your Go library without forcing a particular logging dependency on your users. Use dazl to make logging configurable (via YAML) in your Go application. Dazl is designed to make logging easier for Go developers and their users by providing a unified interface to establish consistency across Go libraries and logging frameworks.<p>Dazl was originally developed in open source at the Open Networking Foundation but remained somewhat hidden away within the subdirectories of an obscure repo. My team has since moved to Intel where this project is still in use in today. I’m sharing it now in the hopes Go developers will get the same value from it we have.

1 comment

bborehamabout 2 years ago
Thanks for highlighting. How does it relate to slog?<p><a href="https:&#x2F;&#x2F;pkg.go.dev&#x2F;golang.org&#x2F;x&#x2F;exp&#x2F;slog" rel="nofollow">https:&#x2F;&#x2F;pkg.go.dev&#x2F;golang.org&#x2F;x&#x2F;exp&#x2F;slog</a>
评论 #35664917 未加载