mirror of
https://github.com/safing/portmaster
synced 2025-09-02 10:39:22 +00:00
Merge pull request #55 from safing/fix/portmaster-control-date-format
Fix portmaster control date format
This commit is contained in:
commit
0a89fb1b3f
2 changed files with 5 additions and 5 deletions
|
@ -81,7 +81,7 @@ func initControlLogFile() *os.File {
|
||||||
}
|
}
|
||||||
|
|
||||||
// open log file
|
// open log file
|
||||||
logFilePath := filepath.Join(logFileBasePath, fmt.Sprintf("%s.log", time.Now().UTC().Format("2006-02-01-15-04-05")))
|
logFilePath := filepath.Join(logFileBasePath, fmt.Sprintf("%s.log", time.Now().UTC().Format("2006-01-02-15-04-05")))
|
||||||
return initializeLogFile(logFilePath, "control/portmaster-control", info.Version())
|
return initializeLogFile(logFilePath, "control/portmaster-control", info.Version())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ func logControlError(cErr error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// open log file
|
// open log file
|
||||||
logFilePath := filepath.Join(logFileBasePath, fmt.Sprintf("%s.error.log", time.Now().UTC().Format("2006-02-01-15-04-05")))
|
logFilePath := filepath.Join(logFileBasePath, fmt.Sprintf("%s.error.log", time.Now().UTC().Format("2006-01-02-15-04-05")))
|
||||||
errorFile := initializeLogFile(logFilePath, "control/portmaster-control", info.Version())
|
errorFile := initializeLogFile(logFilePath, "control/portmaster-control", info.Version())
|
||||||
if errorFile == nil {
|
if errorFile == nil {
|
||||||
return
|
return
|
||||||
|
@ -121,7 +121,7 @@ func logControlStack() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// open log file
|
// open log file
|
||||||
logFilePath := filepath.Join(logFileBasePath, fmt.Sprintf("%s.stack.log", time.Now().UTC().Format("2006-02-01-15-04-05")))
|
logFilePath := filepath.Join(logFileBasePath, fmt.Sprintf("%s.stack.log", time.Now().UTC().Format("2006-01-02-15-04-05")))
|
||||||
errorFile := initializeLogFile(logFilePath, "control/portmaster-control", info.Version())
|
errorFile := initializeLogFile(logFilePath, "control/portmaster-control", info.Version())
|
||||||
if errorFile == nil {
|
if errorFile == nil {
|
||||||
return
|
return
|
||||||
|
|
|
@ -236,13 +236,13 @@ func execute(opts *Options, args []string) (cont bool, err error) {
|
||||||
log.Printf("failed to check/create log file dir %s: %s\n", logFileBasePath, err)
|
log.Printf("failed to check/create log file dir %s: %s\n", logFileBasePath, err)
|
||||||
} else {
|
} else {
|
||||||
// open log file
|
// open log file
|
||||||
logFilePath := filepath.Join(logFileBasePath, fmt.Sprintf("%s.log", time.Now().UTC().Format("2006-02-01-15-04-05")))
|
logFilePath := filepath.Join(logFileBasePath, fmt.Sprintf("%s.log", time.Now().UTC().Format("2006-01-02-15-04-05")))
|
||||||
logFile = initializeLogFile(logFilePath, opts.Identifier, file.Version())
|
logFile = initializeLogFile(logFilePath, opts.Identifier, file.Version())
|
||||||
if logFile != nil {
|
if logFile != nil {
|
||||||
defer finalizeLogFile(logFile, logFilePath)
|
defer finalizeLogFile(logFile, logFilePath)
|
||||||
}
|
}
|
||||||
// open error log file
|
// open error log file
|
||||||
errorFilePath := filepath.Join(logFileBasePath, fmt.Sprintf("%s.error.log", time.Now().UTC().Format("2006-02-01-15-04-05")))
|
errorFilePath := filepath.Join(logFileBasePath, fmt.Sprintf("%s.error.log", time.Now().UTC().Format("2006-01-02-15-04-05")))
|
||||||
errorFile = initializeLogFile(errorFilePath, opts.Identifier, file.Version())
|
errorFile = initializeLogFile(errorFilePath, opts.Identifier, file.Version())
|
||||||
if errorFile != nil {
|
if errorFile != nil {
|
||||||
defer finalizeLogFile(errorFile, errorFilePath)
|
defer finalizeLogFile(errorFile, errorFilePath)
|
||||||
|
|
Loading…
Add table
Reference in a new issue