text

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package text implements a development-friendly textual handler.

Index

Constants

This section is empty.

Variables

Colors mapping.

View Source
var Strings = [...]string{
	log.DebugLevel: "DEBU",
	log.InfoLevel:  "INFO",
	log.WarnLevel:  "WARN",
	log.ErrorLevel: "ERRO",
	log.FatalLevel: "FATA",
}

Strings mapping.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Writer io.Writer
	// contains filtered or unexported fields
}

Handler implementation.

func New

func New(w io.Writer) *Handler

New handler.

func (*Handler) HandleLog

func (h *Handler) HandleLog(e *log.Entry) error

HandleLog implements log.Handler.

func (*Handler) WithExpandedFields

func (h *Handler) WithExpandedFields(v bool) *Handler

WithExpandedFields sets the expanded field state.

Jump to

Keyboard shortcuts

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