This commit is contained in:
merlinmiao 2026-04-06 10:31:06 +00:00 committed by GitHub
commit 673af90a5b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -217,6 +217,9 @@ func DisableFileLogging() {
} }
} }
// ConfigureFromEnv reads PICOCLAW_LOG_FILE from the environment and
// enables file logging if set. The log level is controlled separately
// via PICOCLAW_LOG_LEVEL in the config/gateway package.
func ConfigureFromEnv() { func ConfigureFromEnv() {
if logFile := os.Getenv("PICOCLAW_LOG_FILE"); logFile != "" { if logFile := os.Getenv("PICOCLAW_LOG_FILE"); logFile != "" {
if strings.HasPrefix(logFile, "~/") { if strings.HasPrefix(logFile, "~/") {