diff options
Diffstat (limited to 'vlog')
-rw-r--r-- | vlog/vlog.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vlog/vlog.go b/vlog/vlog.go new file mode 100644 index 0000000..ab48478 --- /dev/null +++ b/vlog/vlog.go @@ -0,0 +1,25 @@ +// vlog -- verbose logger -- wraps log functions and only performs them if "verbose" +package vlog + +import ( + "fmt" +) + +var VERBOSE bool + +func init() { + VERBOSE=false +} + +func Printf(format string, v ...interface{}) { + if VERBOSE { + fmt.Printf(format, v...) + } +} + +func Println(v ...interface{}) { + if VERBOSE { + fmt.Println(v...) + } +} + |