log: github.com/apex/log/handlers/text Index | Files

package text

import "github.com/apex/log/handlers/text"

Package text implements a development-friendly textual handler.


Package Files



var Colors = [...]int{
    log.DebugLevel: gray,
    log.InfoLevel:  blue,
    log.WarnLevel:  yellow,
    log.ErrorLevel: red,
    log.FatalLevel: red,

Colors mapping.

var Default = New(os.Stderr)

Default handler outputting to stderr.

var Strings = [...]string{
    log.DebugLevel: "DEBUG",
    log.InfoLevel:  "INFO",
    log.WarnLevel:  "WARN",
    log.ErrorLevel: "ERROR",
    log.FatalLevel: "FATAL",

Strings mapping.

type Handler Uses

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

Handler implementation.

func New Uses

func New(w io.Writer) *Handler

New handler.

func (*Handler) HandleLog Uses

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

HandleLog implements log.Handler.

Package text imports 6 packages (graph) and is imported by 46 packages. Updated 2019-09-30. Refresh now. Tools for package owners.