printer

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2023 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 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)

Log logs the entry using Printer. Message is formatted using logfmt.

type Printer

type Printer interface {
	// Println prints line. It can use skipCallerFrames to print information about caller.
	Println(skipCallerFrames int, msg string)
}

Printer is someone who can print lines.

Jump to

Keyboard shortcuts

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