pull/25/merge
lifei6671 2017-05-01 16:17:26 +08:00
parent 7ced70290f
commit 21f60db3c0
2 changed files with 5 additions and 3 deletions

View File

@ -79,6 +79,11 @@ func RegisterLogger() {
logs.Async()
//beego.BeeLogger.DelLogger("console")
if _,err := os.Stat("logs/log.log"); os.IsNotExist(err) {
if f,err := os.Create("logs/log.log");err == nil {
f.Close()
}
}
beego.SetLogger("file",`{"filename":"logs/log.log"}`)
beego.SetLogFuncCall(true)
beego.BeeLogger.Async()

View File

@ -36,8 +36,5 @@ if [ ! -z $httpport ] ; then
sed -i 's/^httpport.*/httpport='$httpport'/g' conf/app.conf
fi
if [ ! -f "logs/log.log" ] ; then
echo "" > /go/src/github.com/lifei6671/godoc/logs/log.log
fi
./$goFile