summaryrefslogtreecommitdiffstats
path: root/log.go
diff options
context:
space:
mode:
Diffstat (limited to 'log.go')
-rw-r--r--log.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/log.go b/log.go
index f5e2bc1..0221ef9 100644
--- a/log.go
+++ b/log.go
@@ -22,6 +22,9 @@ func setupLog() (func() error, error) {
if err != nil {
return nil, err
}
+ if err := os.MkdirAll(filepath.Dir(logFile), 0o644); err != nil {
+ return nil, err
+ }
f, err := os.OpenFile(logFile, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0o644)
if err != nil {
return nil, err