Fix bug related to log
This commit is contained in:
parent
794cd27db3
commit
6a16866f4e
4 changed files with 6 additions and 4 deletions
3
serve.go
3
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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue