yaws icon indicating copy to clipboard operation
yaws copied to clipboard

report.log no longer captures all logs

Open leoliu opened this issue 6 years ago • 3 comments

Before OTP 21, error_logger is the only logger provided by default and used by OTP. The result is when Yaws report.log is enabled (default) most logs are captured.

The situation changed since OTP 21. error_logger is now the legacy logger and captures only logs produced by error_logger. Most of OTP has migrated to the new logger. As times goes by so will more and more 3rd party apps while error_logger is being phased out. As a result report.log is becoming less useful capturing a shrinking subset of logs.

I have to disable report.log on OTP 21 and use logger so that no logs go unnoticed.

leoliu avatar Feb 17 '19 02:02 leoliu

@leoliu can you provide an example of information that in older Erlang/OTP versions would make it into report.log but is no longer there with version 21 or newer? I'm trying to figure out how to tackle this issue, and more details would be helpful. Thanks in advance.

vinoski avatar May 21 '19 11:05 vinoski

If an application uses logger to produce logs, those won't be written to report.log. For example,

logger:error([{error, this_is_a_test}]).

In older OTP where there was no logger, the above log is likely written as

error_logger:error_report([{error, this_is_a_test}]).

leoliu avatar May 21 '19 11:05 leoliu

OK, thanks. I just wanted to be sure it wasn't more complicated than this.

vinoski avatar May 21 '19 15:05 vinoski