Yet another structured logging library

Package is described as a logging library, but it is currently a printing library on Erlang #1

Open lpil.uk
Open opened by lpil.uk

Hello!

The BEAM has a unified logging system that is used by all code running in the VM.

On Erlang this package does use any of the logger APIs or implement of its interfaces, rather it calls io.println. This has some major drawbacks:

  • Any packages that use this instead of the logger will be outside the programmer's control, so they will not be able to format or filter the messages they emit.
  • The programmer will need to configure and program both systems, duplicating this work.
  • No existing logger code can be used so the programmer will have to implement functionality from-scratch.
  • None of the performance aspects of a logger system have been implemented, so use of this library in high-logging situations can hinder the performance both of the process that is logging, and also of the BEAM instance as a whole.

It would be fantastic if this library could integrate with the logger, so folks can enjoy this API while avoiding these issues.

Thank you!

Hi! Thank you for taking the time to open this!

Proper integration with the erlang logger is something I've only looked into briefly, but it is on my todo list.

Currently, users of this library are free to use the erlang logger with it. The example uses io.println for brevity.

I do agree that ideally it would just work with the erlang logger ootb. Do you have any specific docs or (preferrably gleam) libraries in mind that i could / should look at when integrating this?

The documentation for the logger is good!

Ooki; I'll have a more thorough look at that then. Thank you!

I've put in some work (cough cough 1000 line diff) integrating with the erlang logger. It'd mean a lot if you could have a look at it. (Once you arn't busy with the v1.18 release)

Sign up or Sign in to add to the discussion.