Lager: Crash.log is deleted from the folder, only rotated versions are present

Larisa Krasnytskaya lkrasnytskaya@REDACTED
Thu Mar 24 12:33:29 CET 2022


Hello!

After some time of app's work, "crash.log" file appears to be deleted. Only rotated versions are present.
On one environment only one of them is present (crash.log.4), on another - more (crash.log.0, crash.log.3, crash.log.4).

Some inputs:

*        Scheduled rotation makes files to be deleted (by default rotation is happening on midnight);

*        Continuous application restart (as Windows service) makes files to be numbered incorrectly ;

*        Single application restart made crash.log file to be recreated;

Here is my lager confg:

  {lager, [
    {handlers, [
        {lager_file_backend, [{file, "log/error.log"}, {level, error}, {size, 10485760}, {count, 59}]},
        {lager_file_backend, [{file, "log/info.log"}, {level, info}, {size, 10485760}, {count, 29}]},
        {lager_file_backend, [{file, "log/debug.log"}, {level, debug}, {size, 31457280}, {count, 99}]}
    ] },
    {crash_log, "log/crash.log"}
  ] }

It looks like that the {crash_log_count} is equal to the default value, i.e. 5.

Lager version 3.2.4 (https://github.com/basho/lager/)
OS: Windows Server 2012

I would appreciate any tips on why this can happens.


Thanks in advance, Larisa

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20220324/8f788c0b/attachment.htm>


More information about the erlang-questions mailing list