Merge 1f390867f8 into 1175f4a62b
This commit is contained in:
commit
673af90a5b
1 changed files with 3 additions and 0 deletions
|
|
@ -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, "~/") {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue