return error

This commit is contained in:
JessonChan 2016-01-12 22:33:52 +08:00
parent 2b9d7ff714
commit 164366ae0d
1 changed files with 3 additions and 2 deletions

View File

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