log

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLevel    = "info"
	DefaultEncoding = "json"
)

Variables

View Source
var (
	DefaultConfigs = Configs{
		Level:    DefaultLevel,
		Encoding: DefaultEncoding,
	}
)

Functions

func NewLogger

func NewLogger(c Configs) (*zap.Logger, error)

Types

type Configs

type Configs struct {
	Level          string
	Encoding       string
	ServiceContext *ServiceContext
}

type ServiceContext

type ServiceContext struct {
	Service string
	Version string
}

func (ServiceContext) MarshalLogObject

func (sc ServiceContext) MarshalLogObject(enc zapcore.ObjectEncoder) error

Jump to

Keyboard shortcuts

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