debug

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 8 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 ...interface{})

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 ...interface{})

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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