blob: 06c86dad9010e0618a45f655fa2d0e16dc3a53cb [file] [log] [blame]
package vdlutil
import (
"io/ioutil"
"log"
"os"
)
const (
logPrefix = ""
logFlags = log.Lshortfile | log.Ltime | log.Lmicroseconds
)
var (
// Vlog is a logger that discards output by default, and only outputs real
// logs when SetVerbose is called.
Vlog = log.New(ioutil.Discard, logPrefix, logFlags)
)
// SetVerbose tells the vdl package (and subpackages) to enable verbose logging.
func SetVerbose() {
Vlog = log.New(os.Stderr, logPrefix, logFlags)
}