debugfmt

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: MIT Imports: 7 Imported by: 0

README

debugfmt

Build Status PRs Welcome GitHub license

A log handler for https://github.com/apex/log with human-friendly colored output. Build for development environment.

image

Installing

go get -u github.com/sqrthree/debugfmt

Usage

See _examples to get more details.


sqrtthree.com  ·  GitHub @sqrthree  ·  Twitter @sqrtthree

Documentation

Overview

Package debugfmt implements a development-friendly textual handler.

Index

Constants

This section is empty.

Variables

Colors mapping.

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

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 returns a new handle.

func (*Handler) HandleLog

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

HandleLog implements log.Handler.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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