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:

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 Libraries Top

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
pkrawat1
Hey guyz We at @aviabird are working on a payment library in elixir/phoenix. We are targeting March 2018 to add 56 Gateways to it. Have...
New
OvermindDL1
Been making an MLElixir thing (not released yet…) for fun in spare time in the past day. I’m just trying to see how much I can get an ML...
132 13487 106
New
mbuhot
Leverage Open Api 3.0 (Swagger) to document, test, validate and explore your Plug and Phoenix APIs. Generate and serve a JSON Open API ...
New
wfgilman
I’ve cleaned up and open sourced three financial libraries I was using for my company. They are bindings for the APIs of these three comp...
New
mbuhot
EctoJob A transactional job queue built with Ecto, PostgreSQL and GenStage Available on Hex.pm: ecto_job | Hex Docs: API Reference — ec...
New
Jskalc
Hi! Today, after a couple weeks of development I’ve released v0.1 of LiveVue. It’s a seamless integration of Vue and Phoenix LiveView, i...
New
josevalim
Yes, yet another parser combinator library! Most of the parser combinators in the ecosystem are either compile-time, often using AST tra...
159 18262 141
New
gjaldon
As the title states, EctoEnum has just been updated after some time of hardly any activity in the repo. Here’s the latest release: https:...
New
mischov
import Meeseeks.CSS html = HTTPoison.get!("https://news.ycombinator.com/").body for story <- Meeseeks.all(html, css("tr.athing")) do...
New

Other popular topics Top

dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
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 27727 240
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New

Sub Categories:

We're in Beta

About us Mission Statement