debug

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 10 Imported by: 12

Documentation

Overview

Package debug provides logging of debug information.

This package is heavily based on github.com/restic/restic/internal/debug

Index

Constants

This section is empty.

Variables

View Source
var (
	// Stdout is exported for tests.
	Stdout io.Writer = os.Stdout
	// Stderr is exported for tests.
	Stderr io.Writer = os.Stderr
)

Functions

func IsEnabled

func IsEnabled() bool

IsEnabled returns true if debug logging was enabled.

func Log

func Log(f string, args ...any)

Log logs a statement to Stderr (unless filtered) and the debug log file (if enabled).

func LogN added in v1.12.5

func LogN(offset int, f string, args ...any)

LogN logs a statement to Stderr (unless filtered) and the debug log file (if enabled). The offset will be applied to the runtime position.

func ModuleVersion added in v1.14.0

func ModuleVersion(m string) semver.Version

ModuleVersion the version of the named import.

Types

This section is empty.

Jump to

Keyboard shortcuts

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