aboutsummaryrefslogtreecommitdiffstats
path: root/vlog/vlog.go
diff options
context:
space:
mode:
Diffstat (limited to 'vlog/vlog.go')
-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...)
+ }
+}
+