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

println is builtin function

This commit is contained in:
JessonChan 2019-03-12 15:51:43 +08:00
parent 9cecb22170
commit 44a1a8f6be
3 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ func (c *connWriter) WriteMsg(when time.Time, msg string, level int) error {
defer c.innerWriter.Close()
}
c.lg.println(when, msg)
c.lg.writeln(when, msg)
return nil
}

View File

@ -80,7 +80,7 @@ func (c *consoleWriter) WriteMsg(when time.Time, msg string, level int) error {
if c.Colorful {
msg = strings.Replace(msg, levelPrefix[level], colors[level](levelPrefix[level]), 1)
}
c.lg.println(when, msg)
c.lg.writeln(when, msg)
return nil
}

View File

@ -30,7 +30,7 @@ func newLogWriter(wr io.Writer) *logWriter {
return &logWriter{writer: wr}
}
func (lg *logWriter) println(when time.Time, msg string) {
func (lg *logWriter) writeln(when time.Time, msg string) {
lg.Lock()
h, _, _ := formatTimeHeader(when)
lg.writer.Write(append(append(h, msg...), '\n'))