lager
lager copied to clipboard
Query erlang.log creation
I am using lager. This is my config.
There is an erlang.log
file being created in the log folder which is essentially duplicating stuff that is in debug.log
. Could you tell the reason for its creation?
I am passing this in vm.args file to erlang
-sasl sasl_error_logger false
{lager, [
{log_root, "log" },
{crash_log, "crash.log"},
{handlers, [
{lager_console_backend, [
{level, debug},
{formatter, lager_default_formatter},
{formatter_config, [time," [",severity,"] ", message, "\n"]}
]},
{lager_file_backend, [
{file, "debug.log"},
{level, debug},
{formatter, lager_default_formatter},
{formatter_config, [date, " ", time," [",severity,"] ",pid, " ", message, "\n"]},
{size, 2097152}, {date, "$D0"}, {count, 5}
]}
]}
]}
@pankajsoni19
meet the same issue recently, wonder how you fix it
tks
Couldn't fix it. These are 5 files, and not much of a big deal so ignored it. I just wanted to know the reason, why this was happening.
Thanks for quick reply.
In my case, it is a real matter, because I find that there are quite many logs writen into this file
Also I find that my erlang application is not running normally, from the log output, I see some latency (somethings > 1s) happened now and then.
I can't find how to disable erlang.log
That's not a lager file. Your release may be logging stdout to the file, in which case you may want to try disabling the console log handler.
@Vagabond
Thanks for your tips, I will have a try.
by https://erlang.org/doc/man/run_erl.html , find that erlang.log is created by run_erl
.