console

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: MIT Imports: 5 Imported by: 3

Documentation

Overview

Package console provides yala adapters capable of logging using simplified console logger. This logger is meant to be used for development purposes only. It does not provide any knobs and switches. If you need customization, then please use real production-ready logger like zap, logrus or zerolog with appropriate adapter.

The format of message produced by console adapters is:

LEVEL message key=value key=value error=error

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StderrAdapter

func StderrAdapter() logger.Adapter

StderrAdapter returns a logger.Adapter implementation which prints log messages to stderr.

func StdoutAdapter

func StdoutAdapter() logger.Adapter

StdoutAdapter returns a logger.Adapter implementation which prints log messages to stdout.

Types

type WriterPrinter

type WriterPrinter struct {
	Writer io.Writer
}

WriterPrinter implements printer.Printer by adapting io.Writer. Should be used with care, because it discards all errors returned during writing.

func (WriterPrinter) Println

func (p WriterPrinter) Println(skipCallerFrames int, msg string)

Println prints the msg using io.Writer. Errors are discarded.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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