|
|
@ -11,6 +11,7 @@ import ( |
|
|
|
"io" |
|
|
|
"io" |
|
|
|
"os" |
|
|
|
"os" |
|
|
|
"os/exec" |
|
|
|
"os/exec" |
|
|
|
|
|
|
|
"path" |
|
|
|
"strconv" |
|
|
|
"strconv" |
|
|
|
"strings" |
|
|
|
"strings" |
|
|
|
"time" |
|
|
|
"time" |
|
|
@ -47,8 +48,9 @@ gogs serv provide access auth for repositories`, |
|
|
|
|
|
|
|
|
|
|
|
func newLogger(execDir string) { |
|
|
|
func newLogger(execDir string) { |
|
|
|
level := "0" |
|
|
|
level := "0" |
|
|
|
os.MkdirAll("log", os.ModePerm) |
|
|
|
logPath := execDir + "/log/serv.log" |
|
|
|
log.NewLogger(10000, "file", fmt.Sprintf(`{"level":%s,"filename":"%s"}`, level, 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...") |
|
|
|
log.Trace("start logging...") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|