martosaur

martosaur

LoggerHandlerKit - your guide to Elixir logger handlers

I’m excited to announce LoggerHandlerKit – an educational package for developers who want to write their own logger handler. It provides:

  1. An example test suite for the default Elixir logger
  2. A collection of test helpers, including test cases
  3. Docs and code comments to help you through :folded_hands:

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 :heart:

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:

https://github.com/martosaur/logger_handler_kit

Most Liked

jberling

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

martosaur

LoggerHandlerKit received two new guides: about log translation and unhandled errors

venkatd

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.

Where Next?

Popular in Announcing Top

danschultzer
In short Plug n’ play OAuth 2.0 provider library. Just set up a resource owner schema with Ecto (your user schema), install the dependen...
New
martinthenth
Hello everybody :wave: Recently, some of my colleagues talked about database ids and uuids and their problems, and I remembered the pain...
New
ostinelli
Let’s write a database! Well not really, but I think it’s a little sad that there doesn’t seem to be a simple in-memory distributed KV da...
New
tfwright
After working on it for a couple of months and using it in production for most of that time, today I’ve released LiveAdmin, a LiveView ba...
New
mtrudel
Bandit is an HTTP server for Plug and WebSock apps. Bandit is written entirely in Elixir and is built atop Thousand Island. It can serve...
New
kelvinst
Hey everyone! Well, we made this lib a while ago and now we decided to finally go out and public with it! It’s a tool for creating and m...
New
wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
Azolo
Hey everyone, I just released WebSockex which is a Elixir WebSocket client. WebSockex strives to work as a OTP special process, be RFC6...
New
Flo0807
Hello everyone! I am excited to share our heart project Backpex with you. After building several Phoenix applications, we realized that...
New
marcuslankenau
I feel kind of stuck with the absence of a proper xml library for Elixir. Currently I use SweetXML which was ok for me more or less to pa...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36128 110
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New

We're in Beta

About us Mission Statement