zaplog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package zaplog provides conveniences for zap logger.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(format Format, level Level) (*zap.Logger, error)

New returns a new zap logger.

Types

type Format

type Format string

Format defines log format.

const (
	// FormatConsole is console log format.
	FormatConsole Format = "console"

	// FormatJSON is JSON log format.
	FormatJSON Format = "json"
)

func (Format) String

func (f Format) String() string

String implement fmt.Stringer.

func (*Format) UnmarshalText

func (f *Format) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

type Level

type Level struct {
	zap.AtomicLevel
}

Level defines log level.

Jump to

Keyboard shortcuts

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