lager icon indicating copy to clipboard operation
lager copied to clipboard

Query erlang.log creation

Open pankajsoni19 opened this issue 4 years ago • 6 comments

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 avatar Aug 21 '19 06:08 pankajsoni19

@pankajsoni19

meet the same issue recently, wonder how you fix it

tks

moooofly avatar May 09 '20 07:05 moooofly

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.

pankajsoni19 avatar May 09 '20 13:05 pankajsoni19

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

moooofly avatar May 11 '20 05:05 moooofly

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 avatar May 11 '20 16:05 Vagabond

@Vagabond

Thanks for your tips, I will have a try.

moooofly avatar May 12 '20 01:05 moooofly

by https://erlang.org/doc/man/run_erl.html , find that erlang.log is created by run_erl.

moooofly avatar May 19 '20 05:05 moooofly