log

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	Raw   log.Logger
	Info  func(...interface{}) error
	Debug func(...interface{}) error
	Error func(...interface{}) error
}

Logger struct holds a log.Logger plus functions required for logging with different levels. They functions are syntactic sugar to avoid having to import "github.com/go-kit/kit/log/level" in every package that has to cast a log.

func AllowDebug

func AllowDebug(l Logger) Logger

AllowDebug receives a Logger and enables the debug logging level.

func MakeLogger

func MakeLogger(w io.Writer) Logger

MakeLogger receives a io.Writer and return a Logger struct.

Jump to

Keyboard shortcuts

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