Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix bug in f functions

  • Loading branch information...
commit 117dbb2637b51af50acaeb0e8b2768b9533ffda5 1 parent 69a93d4
@edsrzf edsrzf authored
Showing with 4 additions and 8 deletions.
  1. +4 −8 golog.go
View
12 golog.go
@@ -32,8 +32,7 @@ func (l *Logger) Debugln(a ...interface{}) {
func (l *Logger) Debugf(format string, a ...interface{}) {
if l.Level <= Debug {
- a = append([]interface{}{"DEBUG --"}, a...)
- log.Printf(format, a...)
+ log.Printf("DEBUG -- " + format, a...)
}
}
@@ -46,8 +45,7 @@ func (l *Logger) Infoln(a ...interface{}) {
func (l *Logger) Infof(format string, a ...interface{}) {
if l.Level <= Info {
- a = append([]interface{}{"INFO --"}, a...)
- log.Printf(format, a...)
+ log.Printf("INFO -- " + format, a...)
}
}
@@ -60,8 +58,7 @@ func (l *Logger) Warnln(a ...interface{}) {
func (l *Logger) Warnf(format string, a ...interface{}) {
if l.Level <= Warn {
- a = append([]interface{}{"WARN --"}, a...)
- log.Printf(format, a...)
+ log.Printf("WARN -- " + format, a...)
}
}
@@ -74,8 +71,7 @@ func (l *Logger) Errorln(a ...interface{}) {
func (l *Logger) Errorf(format string, a ...interface{}) {
if l.Level <= Error {
- a = append([]interface{}{"ERROR --"}, a...)
- log.Printf(format, a...)
+ log.Printf("ERROR -- " + format, a...)
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.