Any advice on general logging guidelines?

I’ve overwhelmed the logger application in production on numerous occasions, leading to lost of vital logs. I’ve perused a number of resources for pointers on what to log but to no avail.
I would like to find out if there’s a guideline on what to log in production in order not to overwhelm the logger application.

Thank you.

what to log in production

Whatever would help you debug the application in case of an error (or audit). No more, no less.

Erlang/OTP 21's new logger has a section on good logging.

And I think Adopting Elixir book had some insights on logging as well.

3 Likes

Thanks a bunch for the link, the article focuses solely on Erlang’s logger which is quite different in terms of it inner workings from Elixirs Logger, central event handler comes to mind as stated in the article.

This could mean Erlang’s logger will handle more logs than Elixirs own, correct me if this inference is wrong.

In the face of the above, how to I get such log handling capabilities with Elixir’s own logger.

Erlang logger handlers are more bare-bones than elixir logger backends, so it depends on how you write it.

In the face of the above, how to I get such log handling capabilities with Elixir’s own logger.

You can use erlang logger from elixir if needed.

1 Like