mirror of
https://github.com/safing/portmaster
synced 2025-09-02 02:29:12 +00:00
[WIP] Fix logger starting bug
This commit is contained in:
parent
374c1c2748
commit
de3f5a8692
1 changed files with 3 additions and 3 deletions
|
@ -191,7 +191,7 @@ func ParseLevel(level string) Severity {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start starts the logging system. Must be called in order to see logs.
|
// Start starts the logging system. Must be called in order to see logs.
|
||||||
func Start(level string, logToStdout bool, logDir string) (err error) {
|
func Start(level string, logToStdout bool, logDir string) error {
|
||||||
if !initializing.SetToIf(false, true) {
|
if !initializing.SetToIf(false, true) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -232,13 +232,13 @@ func Start(level string, logToStdout bool, logDir string) (err error) {
|
||||||
|
|
||||||
// Delete all logs older than one month.
|
// Delete all logs older than one month.
|
||||||
if !logToStdout {
|
if !logToStdout {
|
||||||
err = CleanOldLogs(logDir, 30*24*time.Hour)
|
err := CleanOldLogs(logDir, 30*24*time.Hour)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Errorf("log: failed to clean old log files: %s", err)
|
Errorf("log: failed to clean old log files: %s", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shutdown writes remaining log lines and then stops the log system.
|
// Shutdown writes remaining log lines and then stops the log system.
|
||||||
|
|
Loading…
Add table
Reference in a new issue