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

This commit is contained in:
Harshavardhana committed 2015-03-23 18:18:11 -07:00
1 parent 80892c5c9b
commit 914962bd93
11 files changed
+169 -21

No files matched your search

+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...)
}
}