Files
3x-ui/internal/logger
Sanaei 7ef22f94c9 fix(logger): fix data race in InitLogger
Replace the package logger variable with an atomic.Pointer so InitLogger swapping the handle no longer races with concurrent Debug/Info/Warning/Error calls from other goroutines. Also guard fileRotate with a mutex, and add a regression test that reproduces the race under concurrent logging.
2026-09-16 02:29:42 +02:00
..