Permalink
Browse files

Added DefaultLogger and some global methods

  • Loading branch information...
1 parent 3136df3 commit ab407b0c9c630d1e99fe1d39d9fe12cb42e3dfb9 @treeder treeder committed Nov 18, 2011
Showing with 15 additions and 0 deletions.
  1. +15 −0 golog.go
View
@@ -11,6 +11,8 @@ const (
Error
)
+var DefaultLogger = NewLogger()
+
type Logger struct {
Level int
}
@@ -40,4 +42,17 @@ func (l *Logger) Errorln(a ...interface{}) {
if l.Level <= Error {
log.Println(a...)
}
+}
+
+func Debugln(a ...interface{}) {
+ DefaultLogger.Debugln(a)
+}
+func Infoln(a ...interface{}) {
+ DefaultLogger.Infoln(a)
+}
+func Warnln(a ...interface{}) {
+ DefaultLogger.Warnln(a)
+}
+func Errorln(a ...interface{}) {
+ DefaultLogger.Errorln(a)
}

0 comments on commit ab407b0

Please sign in to comment.