aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-02-26 10:40:46 +0000
committerr <r@freesoftwareextremist.com>2020-02-26 10:40:57 +0000
commitc41f9272f919644f66148cafb179a4df0e7eae17 (patch)
tree9b61d07db1d365873a83f6f49aff88f3d88db714
parenta57a142328f02908419854e90099bcd275a1f606 (diff)
downloadbloat-c41f9272f919644f66148cafb179a4df0e7eae17.tar.gz
bloat-c41f9272f919644f66148cafb179a4df0e7eae17.zip
Fix logfile
-rw-r--r--main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.go b/main.go
index a634e34..aac7741 100644
--- a/main.go
+++ b/main.go
@@ -90,7 +90,8 @@ func main() {
if len(config.LogFile) < 1 {
logger = log.New(os.Stdout, "", log.LstdFlags)
} else {
- lf, err := os.Open(config.LogFile)
+ lf, err := os.OpenFile(config.LogFile,
+ os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0644)
if err != nil {
errExit(err)
}