1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 16:00:59 +00:00

return error

This commit is contained in:
JessonChan 2016-01-12 22:33:52 +08:00
parent 2b9d7ff714
commit 164366ae0d

View File

@ -185,9 +185,10 @@ func (w *fileLogWriter) WriteMsg(msg string, level int) error {
buf[17] = byte('0' + t) buf[17] = byte('0' + t)
buf[18] = byte('0' + s - t*10) buf[18] = byte('0' + s - t*10)
msg = string(buf[0:]) + msg + "\n" msg = string(buf[0:]) + msg + "\n"
w.doCheck(len(msg)) w.doCheck(len(msg))
w.fd.Write([]byte(msg)) _, err := w.fd.Write([]byte(msg))
return nil return err
} }
func (w *fileLogWriter) createLogFile() (*os.File, error) { func (w *fileLogWriter) createLogFile() (*os.File, error) {