[erlang-questions] Log level of error_logger

Robert Raschke rtrlists@REDACTED
Tue Sep 8 10:35:58 CEST 2009


On Tue, Sep 8, 2009 at 3:53 AM, Ngoc Dao <ngocdaothanh@REDACTED> wrote:

> As far as I know error_logger is the only "standard" log library of
> Erlang/OTP. Is there a way to specify log level (debug, info, warn,
> error, fatal) and log destination (console, file) of error_logger?
>
> I'm using log4erl which has these features. I'm curious if
> error_logger has these.
>

In the standard distro there are two error loggers available. One plain text
one that you can configure using some sys.config file settings (see the
kernel doc page, http://www.erlang.org/doc/man/kernel_app.html); but it
justs bangs everything into the one big log. Then there's the error logger
that gets installed when you start SASL (see the sasl doc page,
http://www.erlang.org/doc/man/sasl_app.html). That one allows you to specify
a rolling log, for example. And the report browser (rb) allows you to view
log entries at specific levels.

I am using the sasl error logging and am reasonably happy with it at the
moment. But I do get the slight impression that these error loggers are
there as a base to build upon.

There's also a module disk_log, that looks like it would be a good fit for
implementing your own more tailored file logging. Logging comes up once in a
while in the mailing list, so a search through the archives can probably be
very enlightening.

Robby


More information about the erlang-questions mailing list