diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-25 08:56:01 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-25 08:56:01 -0400 |
commit | 9aba29dd8f067338025593b7c409b494d4b0ce32 (patch) | |
tree | 047071af4af5e78c2449c21e99157b6cee150122 /serve.go | |
parent | 197c4d4a5ba8a9540c49879324194f5f6be4689c (diff) | |
download | gitea-9aba29dd8f067338025593b7c409b494d4b0ce32.tar.gz gitea-9aba29dd8f067338025593b7c409b494d4b0ce32.zip |
Fix wrong serve command log location and commit repo action
Diffstat (limited to 'serve.go')
-rw-r--r-- | serve.go | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -11,6 +11,7 @@ import ( "io" "os" "os/exec" + "path" "strconv" "strings" "time" @@ -47,8 +48,9 @@ gogs serv provide access auth for repositories`, func newLogger(execDir string) { level := "0" - os.MkdirAll("log", os.ModePerm) - log.NewLogger(10000, "file", fmt.Sprintf(`{"level":%s,"filename":"%s"}`, level, execDir+"/log/serv.log")) + logPath := execDir + "/log/serv.log" + os.MkdirAll(path.Dir(logPath), os.ModePerm) + log.NewLogger(10000, "file", fmt.Sprintf(`{"level":%s,"filename":"%s"}`, level, logPath)) log.Trace("start logging...") } |