log

package
v1.103.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: Apache-2.0 Imports: 2 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	Printf(format string, args ...interface{})
}

Logger specifies the interface for all log operations.

var DefaultStdLogger Logger = log.New(os.Stderr, "", log.LstdFlags)

DefaultStdLogger represents the default logger which will write log messages to stdout, and use same formatting runes as the stdlib log.Logger.

type LoggerFunc

type LoggerFunc func(format string, args ...interface{})

The LoggerFunc type is an adapter to allow the use of ordinary functions as Logger. If f is a function with the appropriate signature, LoggerFunc(f) is a Logger that calls f.

func (LoggerFunc) Printf

func (f LoggerFunc) Printf(format string, args ...interface{})

Printf calls f(format, args).

Jump to

Keyboard shortcuts

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