[erlang-questions] log4erl as system logger

Damian Dobroczyński <>
Wed Jun 2 14:30:34 CEST 2010

W dniu 02.06.2010 14:22, Alex Arnon pisze:
> Could one possibly simply add an error_logger appender?
> Maybe make it the default?

Sorry, I do not know log4erl application ; but what I've seen in the
source code there's nothing like error_logger appender (unless you
create it) but only error_logger events handler which acts like a
"bridge" between error_logger protocol and log4erl protocol (as I've
written in the previous post).


> 2010/6/2 Damian Dobroczyński <>
>> W dniu 02.06.2010 12:13, Max Lapshin pisze:
>>> Hi. I want to use log4erl as a default error logger for all system (to
>>> log all process failures),
>>> but I don't understand how.
>>> What part of erlang documentation have I missed? Where should I read
>>> to understand, how to change logger.
>> error_logger is "gen_event" process registered locally under the name
>> "error_logger". The process start is hard-coded in the "kernel"
>> application (kernel.erl module implements "kernel_sup" supervisor
>> behavior - this supervisor launches the "error_logger" process) which is
>> loaded as the very first. What you can do is to kill this process as
>> soon as possible (risking that some logging messages would not reach the
>> logger) and replace it with another "gen_event" process registering it
>> under the name "error_logger". You may obtain this by launching special
>> application that starts only the specialized gen_event process (if you
>> want to use it in a boot script) or by passing a command line options
>> "-s <module_name>" which fires <module_name>:start/0 function. The
>> latter is launched after all primary application has been loaded, so the
>> initial logs would go through the standard error_logger. I think you
>> should write a special "launcher" module to replace the standard logger.
>> Besides log4erl must implements error_logger message protocol. I do not
>> know it is so.
>> Hope this helps,
>> Damian
>>> ________________________________________________________________
>>> erlang-questions (at) erlang.org mailing list.
>>> See http://www.erlang.org/faq.html
>>> To unsubscribe; mailto:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20100602/ed5759e7/attachment.bin>

More information about the erlang-questions mailing list