mirror of
https://github.com/go-gost/x.git
synced 2026-10-19 16:16:32 +00:00
A log config can name an output without naming a rotation, and that combination used to receive a plain *os.File — nothing rotates it, ever. One spoke on Android ran debug-level logging into exactly that shape and grew the file to 111MB with no backups, which on a phone is not untidy so much as fatal. Default the rotation instead. The values match what an unconfigured logger has always carried, so naming an output is no longer a way to ask for an unbounded file, and a configured rotation still wins as written. outputWriter is split out of ParseLogger so the decision — the part that chooses whether a file log stops growing — is testable without a logger. Signed-off-by: Step 5 Preview Free <noreply@stepfun.com>