vlog

package
v0.0.0-...-62694dd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 1 Imported by: 5

Documentation

Overview

Package vlog implements conditional verbose/debug logging.

Index

Constants

This section is empty.

Variables

View Source
var Level = 0

Level controls which verbose logging statements are executed. It is the minimal number for which V(x) returns true.

Functions

This section is empty.

Types

type Verbose

type Verbose bool

Verbose is a boolean type that implements info log methods. See V().

func V

func V(x int) Verbose

V reports whether verbosity at the call site is at least the requested level. The returned value is a boolean of type Verbose, which implements Printf. This method will write to the log if called. Whether an individual call to V generates a log record depends on the setting of Level.

func (Verbose) Printf

func (v Verbose) Printf(format string, values ...interface{})

Printf is equivalent to log.Printf, guarded by the value of v.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL