Implement log package as drop-in replacement for handling Debug log-level

This commit is contained in:
Harshavardhana
2015-03-23 18:12:20 -07:00
parent 80892c5c9b
commit 914962bd93
11 changed files with 169 additions and 21 deletions
+26
View File
@@ -0,0 +1,26 @@
package log
import (
internalLog "log"
)
// Debug logging
func Debug(args ...interface{}) {
if verify(DebugLOG) {
internalLog.Print(args...)
}
}
// Debugf formatted debug logging
func Debugf(s string, args ...interface{}) {
if verify(DebugLOG) {
internalLog.Printf(s, args...)
}
}
// Debugln logging with newline
func Debugln(args ...interface{}) {
if verify(DebugLOG) {
internalLog.Println(args...)
}
}