Fix wrong serve command log location and commit repo action
This commit is contained in:
parent
09e7e76204
commit
197c4d4a5b
4 changed files with 11 additions and 7 deletions
6
serve.go
6
serve.go
|
@ -45,10 +45,10 @@ gogs serv provide access auth for repositories`,
|
|||
Flags: []cli.Flag{},
|
||||
}
|
||||
|
||||
func init() {
|
||||
func newLogger(execDir string) {
|
||||
level := "0"
|
||||
os.MkdirAll("log", os.ModePerm)
|
||||
log.NewLogger(10000, "file", fmt.Sprintf(`{"level":%s,"filename":"%s"}`, level, "log/serv.log"))
|
||||
log.NewLogger(10000, "file", fmt.Sprintf(`{"level":%s,"filename":"%s"}`, level, execDir+"/log/serv.log"))
|
||||
log.Trace("start logging...")
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,8 @@ func In(b string, sl map[string]int) bool {
|
|||
}
|
||||
|
||||
func runServ(k *cli.Context) {
|
||||
execDir, _ := base.ExecDir()
|
||||
newLogger(execDir)
|
||||
log.Trace("new serv request " + log.Mode + ":" + log.Config)
|
||||
|
||||
base.NewConfigContext()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue