TUN-3759: Single file logging output should always append

This commit is contained in:
Nuno Diegues 2021-01-14 16:23:56 +00:00
parent 42cdb557a0
commit d26df1c248
1 changed files with 1 additions and 1 deletions

View File

@ -161,7 +161,7 @@ func createLogFile(config FileConfig) (io.Writer, error) {
mode := os.FileMode(filePermMode)
fullPath := filepath.Join(config.Dirname, config.Filename)
logFile, err := os.OpenFile(fullPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, mode)
logFile, err := os.OpenFile(fullPath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, mode)
if err != nil {
return nil, fmt.Errorf("unable to create a new logfile: %s", err)
}