aboutsummaryrefslogtreecommitdiffstats
path: root/internal/vlog/vlog.go
blob: 2cd30a55beb953432bbf69ad304de5864e9b1473 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// 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...)
	}
}