printer

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	Printer Printer
}

Adapter is a logger.Adapter implementation, which is using Printer interface. This interface is implemented for example by log.Logger from the Go standard library.

This adapter prints fields and error in logfmt format. For example:

message key=value error=message

func (Adapter) Log

func (f Adapter) Log(ctx context.Context, entry logger.Entry)

type Printer

type Printer interface {
	Println(...interface{})
}

Jump to

Keyboard shortcuts

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