Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added DefaultLogger and some global methods

  • Loading branch information...
commit ab407b0c9c630d1e99fe1d39d9fe12cb42e3dfb9 1 parent 3136df3
@treeder treeder authored
Showing with 15 additions and 0 deletions.
  1. +15 −0 golog.go
View
15 golog.go
@@ -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)
}
Please sign in to comment.
Something went wrong with that request. Please try again.