log

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// VerboseDebugger is a Debugger that allowed prints messages to standard output.
	VerboseDebugger = &Debugger{enable: true}
)

Functions

func WithDebugger

func WithDebugger(ctx context.Context, l *Debugger) context.Context

WithDebugger returns a new context with a Debugger.

Types

type Debugger

type Debugger struct {
	// contains filtered or unexported fields
}

Debugger is a logger that prints debug information.

func DebuggerFromContext

func DebuggerFromContext(ctx context.Context) *Debugger

DebuggerFromContext returns a Debugger stored in a context. If the context does not contain a Debugger the function returns a silent Debugger.

func (*Debugger) Debugf

func (d *Debugger) Debugf(format string, args ...interface{})

Debugf formats according to a format specifier and writes to standard output if enabled.

func (*Debugger) Debugln

func (d *Debugger) Debugln(args ...interface{})

Debugln formats using the default formats for its operands and print to standard output if enabled.

Jump to

Keyboard shortcuts

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