tracer

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *console

New returns a tracer that outputs progress to the terminal.

Types

type LogLevel added in v0.23.0

type LogLevel string
const (
	LogLevelDebug LogLevel = "debug"
	LogLevelInfo  LogLevel = "info"
)

type Tracer

type Tracer interface {
	// Start the named tracer.
	Start(format string, args ...interface{})

	// Stop the named tracer.
	Stop(format string, args ...interface{})

	// Log a message.
	Log(format string, args ...interface{})

	// LogError logs an error message.
	LogError(format string, args ...interface{})

	// Close the tracer.
	Close()

	Debug() Tracer

	// WithLevel is used to set tracer log level at creation
	WithLevel(level LogLevel)
}

Tracer defines tracing methods.

func Default

func Default() Tracer

Default returns the default tracer (noop)

Jump to

Keyboard shortcuts

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