aboutsummaryrefslogtreecommitdiffstats
path: root/vlog
diff options
context:
space:
mode:
authorAdam Mathes <adam@trenchant.org>2017-02-09 20:14:46 -0800
committerAdam Mathes <adam@trenchant.org>2017-02-09 20:14:46 -0800
commit50f608846f1021db4f2335744cc023231fb74652 (patch)
treed75e57955029ebcda9da72a29e3c7555e02b4eb5 /vlog
parentded6e3b25bca083cabe21bda6f4d01f6766587bc (diff)
downloadsnkt-50f608846f1021db4f2335744cc023231fb74652.tar.gz
snkt-50f608846f1021db4f2335744cc023231fb74652.tar.bz2
snkt-50f608846f1021db4f2335744cc023231fb74652.zip
fix some templates, add verbose-logger
Diffstat (limited to 'vlog')
-rw-r--r--vlog/vlog.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/vlog/vlog.go b/vlog/vlog.go
new file mode 100644
index 0000000..9ef771c
--- /dev/null
+++ b/vlog/vlog.go
@@ -0,0 +1,14 @@
+// package vlog wraps log actions and only performs them if "verbose" config is set
+package vlog
+
+import (
+ "snkt/config"
+ "log"
+)
+
+func Printf(format string, v ...interface{}) {
+ if config.Config.Verbose {
+ log.Printf(format, v...)
+ }
+}
+