39c9985c3b
- Add CustomFormatter.Template driven by LOG_FORMAT env var with placeholders %d/%level/%thread/%logger/%traceId/%msg; default format unchanged for backward compatibility. - Replace chained ReplaceAll with strings.NewReplacer for single-pass substitution, avoiding accidental re-substitution when a field value contains a literal placeholder string. - Inject ANSI color at the %level substitution step; removes the old whole-line ReplaceAll(line, "INFO", ...) which would mis-color literal level tokens appearing inside messages. - Cache threadNeeded on the formatter so runtime.Stack only runs when the template references %thread.