update log creation file
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ database
|
|||||||
bin
|
bin
|
||||||
*.xml
|
*.xml
|
||||||
Makefile
|
Makefile
|
||||||
|
config.toml
|
||||||
|
|||||||
@ -75,7 +75,7 @@ func SetupDI(ctx context.Context, cfgpath string, verbose bool, logAsJSON bool)
|
|||||||
case "stderr":
|
case "stderr":
|
||||||
output = os.Stderr
|
output = os.Stderr
|
||||||
default:
|
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 {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("creating file for logging: %w", err)
|
return nil, fmt.Errorf("creating file for logging: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user