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

package delta

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

Package delta provides a log handler which times the delta between each log call, useful for debug output for command-line programs.

Index

Package Files

delta.go

Variables

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

Colors mapping.

var Default = New(os.Stderr)

Default handler.

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

Strings mapping.

type Handler Uses

type Handler struct {
    // contains filtered or unexported fields
}

Handler implementation.

func New Uses

func New(w io.Writer) *Handler

New handler.

func (*Handler) Close Uses

func (h *Handler) Close() error

Close the handler.

func (*Handler) HandleLog Uses

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

HandleLog implements log.Handler.

Package delta imports 7 packages (graph) and is imported by 5 packages. Updated 2017-11-12. Refresh now. Tools for package owners.