update log creation file
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ database
|
||||
bin
|
||||
*.xml
|
||||
Makefile
|
||||
config.toml
|
||||
|
||||
@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user