From 1a2d6724acf76c6de176b345b090a0f20c8adcda Mon Sep 17 00:00:00 2001 From: "fox.cpp" Date: Sat, 31 Aug 2019 15:52:43 +0300 Subject: [PATCH] config: Create log file if it doesn't exist --- config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.go b/config.go index fe5c2be..b58b70a 100644 --- a/config.go +++ b/config.go @@ -231,7 +231,7 @@ func logOutput(m *config.Map, node *config.Node) (interface{}, error) { } return nil, nil default: - w, err := os.OpenFile(arg, os.O_RDWR, os.ModePerm) + w, err := os.OpenFile(arg, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0666) if err != nil { return nil, fmt.Errorf("failed to create log file: %v", err) }