Skip to content

Commit

Permalink
Fix bug in f functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Shaw committed Sep 18, 2012
1 parent 69a93d4 commit 117dbb2
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions golog.go
Expand Up @@ -32,8 +32,7 @@ func (l *Logger) Debugln(a ...interface{}) {


func (l *Logger) Debugf(format string, a ...interface{}) { func (l *Logger) Debugf(format string, a ...interface{}) {
if l.Level <= Debug { if l.Level <= Debug {
a = append([]interface{}{"DEBUG --"}, a...) log.Printf("DEBUG -- " + format, a...)
log.Printf(format, a...)
} }
} }


Expand All @@ -46,8 +45,7 @@ func (l *Logger) Infoln(a ...interface{}) {


func (l *Logger) Infof(format string, a ...interface{}) { func (l *Logger) Infof(format string, a ...interface{}) {
if l.Level <= Info { if l.Level <= Info {
a = append([]interface{}{"INFO --"}, a...) log.Printf("INFO -- " + format, a...)
log.Printf(format, a...)
} }
} }


Expand All @@ -60,8 +58,7 @@ func (l *Logger) Warnln(a ...interface{}) {


func (l *Logger) Warnf(format string, a ...interface{}) { func (l *Logger) Warnf(format string, a ...interface{}) {
if l.Level <= Warn { if l.Level <= Warn {
a = append([]interface{}{"WARN --"}, a...) log.Printf("WARN -- " + format, a...)
log.Printf(format, a...)
} }
} }


Expand All @@ -74,8 +71,7 @@ func (l *Logger) Errorln(a ...interface{}) {


func (l *Logger) Errorf(format string, a ...interface{}) { func (l *Logger) Errorf(format string, a ...interface{}) {
if l.Level <= Error { if l.Level <= Error {
a = append([]interface{}{"ERROR --"}, a...) log.Printf("ERROR -- " + format, a...)
log.Printf(format, a...)
} }
} }


Expand Down

0 comments on commit 117dbb2

Please sign in to comment.