From 50f608846f1021db4f2335744cc023231fb74652 Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Thu, 9 Feb 2017 20:14:46 -0800 Subject: fix some templates, add verbose-logger --- vlog/vlog.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 vlog/vlog.go (limited to 'vlog') 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...) + } +} + -- cgit v1.2.3