Logging decrease my app performance

Jesper Louis Andersen jesper.louis.andersen@REDACTED
Mon Nov 16 18:16:51 CET 2020


On Mon, Nov 16, 2020 at 9:12 AM George Hope <george@REDACTED> wrote:

> what should I do to avoid this performance loss when loglevel  is debug?
>
>
Don't log excessively at the debug level.

Debug logging is for development, and for enabling in a subsystem when you
think something is off. It is quite costly in a fast application, or one
which logs a lot. You can often move a lot of debug logging into metrics of
the more quantitative kind by using counters, histograms, gauges, ...

If you have something odd, use dynamic tracing instead. It tends to be more
effective at figuring out what is going wrong in a piece of code.

Erlang is an introspective environment where you can dig into a running
system. You usually don't need a lot of debug information. Especially not
if you treat errors as values in your program.

-- 
J.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20201116/317d2d77/attachment.htm>


More information about the erlang-questions mailing list