Bug (unwanted feature) in error_logger
Shawn Pearce
spearce@REDACTED
Sat Feb 7 06:50:43 CET 2004
error_logger:tty(Bool)'s documentation claims that tty(true)
will enable output to the console, while tty(false) will stop
output.
What it doesn't say is that repeated calls to tty(true) will continue
to add error_logger_tty_h handlers to the gen_event handler queue
used by error_logger. Each handler will print the event to the
console, so if an application calls tty(true) four times, it will
get four copies of every log message.
There is no documented interface to determine if the tty output
is currently enabled, like there is for the logfile itself.
Would it be possible to get a documented interface to poll for the
console handler being registered currently so we know if its safe to
call tty(true)? Or just squash the duplicate call in the tty(true)
function?
--
Shawn.
Your files are now being encrypted and thrown into the bit bucket.
EOF
More information about the erlang-questions
mailing list