Re: Lager: Crash.log is deleted from the folder, only rotated versions are present
Luke Bakken <[email protected]> Mon, 28 Mar 2022 10:14:44 -0700
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <CADFEJucUBvgm_zMjon9wtpLuxrD6G5dBXkYASTTGpDhmmfQboA@mail.gmail.com> |
Hi Larisa, I suggest that you use Lager from the current, official repository: https://github.com/erlang-lager/lager This PR that I submitted a while back probably fixes the issue you are seeing - https://github.com/erlang-lager/lager/pull/509 Let me know how it goes - Luke On Fri, Mar 25, 2022 at 12:02 AM Larisa Krasnytskaya <[email protected]> wrote: > > 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 > >