[erlang-questions] high-volume logging via a gen_server

Robert Raschke <>
Mon Oct 4 18:00:57 CEST 2010


If you can move from a textual log file to a binary one and move the
formatting from the logging point to the viewing part, then have a look at
how error_logger and rb (report browser) do things. Logging in binary is
pretty fast.

I have found this provides a neat way of handling different logging levels
without needing to restart things. I always log everything at debug level,
and only upon viewing the log, do I filter out the correct level of detail
to show. Disk space is cheap, right? (And yes, you can still get bogged down
this way if there's too much traffic. It becomes an exercise in finding the
right lowest level of log detail.)

Robby


More information about the erlang-questions mailing list