vlog

package
v0.0.0-...-d95a457 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package vlog contains functions for optionally printing if a verbose flag is set and for coalescing multiple duplicate print calls.

Index

Constants

This section is empty.

Variables

View Source
var Verbose bool

Verbose determines whether calls to V* functions actually log or not.

Functions

func LogfQuiet

func LogfQuiet(id, format string, v ...interface{})

LogfQuiet coalesces multiple calls from the same location into one log.Printf call at the end of the suppress duration. If called multiple times, the output will be prepended with "[#x] ", where # is the number of duplicate suppressed calls.

func SetSuppressDuration

func SetSuppressDuration(duration time.Duration)

SetSuppressDuration sets the time for repeated log calls to be suppressed and coalesced.

func VLogf

func VLogf(format string, v ...interface{})

Vlogf calls log.Printf if Verbose is true.

func VLogfQuiet

func VLogfQuiet(id, format string, v ...interface{})

VlogFQuiet calls LogfQuiet if Verbose is true.

Types

This section is empty.

Jump to

Keyboard shortcuts

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