Skip to content
Browse files

Use ... in default logger functions

  • Loading branch information...
1 parent 5a625dd commit a07d03a79402824c542962af29f0ebd4664a278c @edsrzf edsrzf committed Dec 1, 2011
Showing with 12 additions and 6 deletions.
  1. +12 −6 golog.go
View
18 golog.go
@@ -25,35 +25,41 @@ func NewLogger() *Logger {
func (l *Logger) Debugln(a ...interface{}) {
if l.Level <= Debug {
- // doesn't work: a = append([]interface{"DEBUG --"}, a...)
+ // doesn't work: a = append([]interface{"DEBUG --"}, a...)
log.Println(a...)
}
}
+
func (l *Logger) Infoln(a ...interface{}) {
if l.Level <= Info {
log.Println(a...)
}
}
+
func (l *Logger) Warnln(a ...interface{}) {
if l.Level <= Warn {
log.Println(a...)
}
}
+
func (l *Logger) Errorln(a ...interface{}) {
if l.Level <= Error {
log.Println(a...)
}
}
func Debugln(a ...interface{}) {
- DefaultLogger.Debugln(a)
+ DefaultLogger.Debugln(a...)
}
+
func Infoln(a ...interface{}) {
- DefaultLogger.Infoln(a)
+ DefaultLogger.Infoln(a...)
}
+
func Warnln(a ...interface{}) {
- DefaultLogger.Warnln(a)
+ DefaultLogger.Warnln(a...)
}
+
func Errorln(a ...interface{}) {
- DefaultLogger.Errorln(a)
-}
+ DefaultLogger.Errorln(a...)
+}

0 comments on commit a07d03a

Please sign in to comment.
Something went wrong with that request. Please try again.