martosaur
I’m excited to announce LoggerHandlerKit – an educational package for developers who want to write their own logger handler. It provides:
- An example test suite for the default Elixir logger
- A collection of test helpers, including test cases
- Docs and code comments to help you through

The package gives developers a clear scope of test cases to implement and offers guidance along the way. Once all tests pass, you should have a good grasp of how handlers work and your logger handler should be… well, good. Or at least it will be able to handle a large variety of log events and have a solid test suite, it can still be bad in its own unique way ![]()
Right now it covers the core handler functionality and touches on Logger.Translator’s role, but I’m planning to add guides about other aspects too – things like overload protection and encoding/serialization.
To showcase how using LoggerHandlerKit in an existing logging library looks like I switched Sentry and DiscoLog suites to it: sentry, disco-log
Hex: logger_handler_kit | Hex
Github:
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










First 5 of 5 Posts
jberling
Great! I started to implement a structured logger for dev purposes, but got stuck and decided to park the project. Maybe this could get me started again! Thanks!
martosaur
LoggerHandlerKit received two new guides: about log translation and unhandled errors
venkatd
I just wanted to thank you for sharing this. I was struggling to implement a proper logger (BetterStack in our case). It seems like logging in Elixir has evolved a lot over the years so it’s hard to know what the latest best practices are.
martosaur
Yay
I’m glad you find it helpful!
martosaur
LoggerHandlerKit v0.2.0 released and it’s all about metadata: check out this guide and test cases. This is also the release where I shamelessly shill LoggerJSON for its redactor-encoder.