summaryrefslogtreecommitdiffstats
path: root/serve.go
diff options
context:
space:
mode:
Diffstat (limited to 'serve.go')
-rw-r--r--serve.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/serve.go b/serve.go
index e7649476d4..7e00db4734 100644
--- a/serve.go
+++ b/serve.go
@@ -46,7 +46,8 @@ gogs serv provide access auth for repositories`,
func newLogger(execDir string) {
logPath := execDir + "/log/serv.log"
os.MkdirAll(path.Dir(logPath), os.ModePerm)
- f, err := os.Open(logPath)
+
+ f, err := os.OpenFile(logPath, os.O_WRONLY|os.O_APPEND|os.O_CREATE, os.ModePerm)
if err != nil {
qlog.Fatal(err)
}