[erlang-questions] log4erl as system logger
Wed Jun 2 14:22:01 CEST 2010
Could one possibly simply add an error_logger appender?
Maybe make it the default?
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,
> > ________________________________________________________________
> > erlang-questions (at) erlang.org mailing list.
> > See http://www.erlang.org/faq.html
> > To unsubscribe; mailto:
More information about the erlang-questions