fix access log bug

This commit is contained in:
shaoguang 2015-10-06 17:20:32 +08:00
parent 144c5e240c
commit ac9fc95470
1 changed files with 2 additions and 2 deletions

View File

@ -34,8 +34,8 @@ func (l *accessLog) Log(remoteAddr string, usedTime int64, request []byte, err e
format := `%s %q %d [%s]` format := `%s %q %d [%s]`
if err == nil { if err == nil {
l.l.Info(format, remoteAddr, request, usedTime, "OK") l.l.Infof(format, remoteAddr, request, usedTime, "OK")
} else { } else {
l.l.Info(format, remoteAddr, request, usedTime, err.Error()) l.l.Infof(format, remoteAddr, request, usedTime, err.Error())
} }
} }