Files
3x-ui/internal
MHSanaei 249b38e156 fix(logger): reuse the open log rotator when InitLogger runs again
Every InitLogger call built a new lumberjack rotator and dropped the old
one without closing it, leaking a handle on 3xui.log per call, and
loggers still writing through an old rotator kept it alive. On Windows
the open handles block deleting the file, so
TestInitLoggerConcurrentWithLogging failed its t.TempDir cleanup there.
InitLogger now reuses the open rotator for the same path and closes it
only when the path changes, and the test closes the logger it opened.
Neither half is enough alone: with only one of them the test stays red
on Windows.
2026-09-27 15:32:20 +02:00
..
2026-09-16 02:08:08 +02:00