zapbackend

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2018 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Overview

Package greenery/zapbackend is a sample zap logging back-end for greenery based applications.

The zapbackend package implements the greenery library logging interface, using https://github.com/uber-go/zap/ as its back-end. Compared to the standard baselogging package, the zapbackend package supports proper structured logging as well as ANSI colored pretty logging.

The Custom function allows logging with arbitrary zapcore.Field data, if maximum speed and flexibility are required.

Index

Constants

View Source
const (
	Debug = iota
	Info
	Warn
	Error
)

The available logging levels for this backend are as follows and will map to the Debug, Info, Warn and Error zap methods.

Variables

This section is empty.

Functions

func PrettyLogger

func PrettyLogger(cfg greenery.Config, l string, w io.Writer) greenery.Logger

PrettyLogger returns a greenery Logger to be used for pretty logging

func StructuredLogger

func StructuredLogger(cfg greenery.Config, l string, w io.Writer) greenery.Logger

StructuredLogger returns a greenery Logger to be used for structured logging

func TraceLogger

func TraceLogger(cfg greenery.Config) greenery.Logger

TraceLogger returns a greenery Logger to be used for tracing

Types

This section is empty.

Jump to

Keyboard shortcuts

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