funcr

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: Apache-2.0 Imports: 8 Imported by: 45

Documentation

Overview

Package funcr implements github.com/go-logr/logr.Logger in terms of an arbitrary "write" function.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(fn func(prefix, args string), opts Options) logr.Logger

New returns a logr.Logger which is implemented by an arbitrary function.

Types

type MessageClass

type MessageClass int

MessageClass indicates which category or categories of messages to consider.

const (
	None MessageClass = iota
	All
	Info
	Error
)

type Options

type Options struct {
	// LogCaller tells funcr to add a "caller" key to some or all log lines.
	// This has some overhead, so some users might not want it.
	LogCaller MessageClass

	// Verbosity tells funcr which V logs to be write.  Higher values enable
	// more logs.
	Verbosity int
}

Options carries parameters which influence the way logs are generated.

Jump to

Keyboard shortcuts

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