update log creation file

This commit is contained in:
Aleksandr Trushkin
2024-02-26 17:55:44 +03:00
parent e09acf6bdb
commit cc4bf675b8
3 changed files with 2 additions and 63 deletions

View File

@ -75,7 +75,7 @@ func SetupDI(ctx context.Context, cfgpath string, verbose bool, logAsJSON bool)
case "stderr":
output = os.Stderr
default:
outfile, err = os.Create(cfg.Log.Output)
outfile, err = os.OpenFile(cfg.Log.Output, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
return nil, fmt.Errorf("creating file for logging: %w", err)
}