mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 17:30:50 +00:00
println is builtin function
This commit is contained in:
parent
9cecb22170
commit
44a1a8f6be
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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'))
|
||||
|
Loading…
Reference in New Issue
Block a user