diff options
author | Adam Mathes <adam@trenchant.org> | 2017-02-25 17:50:38 -0800 |
---|---|---|
committer | Adam Mathes <adam@trenchant.org> | 2017-02-25 17:50:38 -0800 |
commit | 8359198e5edb272311e10c77e6bf4cb662abd5ec (patch) | |
tree | 064589554fa36d5bf6c17436d39b68964034b1c2 /vlog | |
parent | 09af7d2f740eaa639fdcc2a7aa8c2ee1e3c3dd4d (diff) | |
download | neko-8359198e5edb272311e10c77e6bf4cb662abd5ec.tar.gz neko-8359198e5edb272311e10c77e6bf4cb662abd5ec.tar.bz2 neko-8359198e5edb272311e10c77e6bf4cb662abd5ec.zip |
silent by default, verbose option added. -feeds cmd line option added
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...) + } +} + |