logzap

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 27, 2019 License: Apache-2.0 Imports: 7 Imported by: 3

README

clogzap

使用 uber - zapi实现统一的API

Documentation

Index

Constants

View Source
const (

	// --- key contant ---
	PRESETS = "zap.presets"

	// --- value constant ---
	PRESETS_EXAMPLE = "example"
	PRESETS_PROD    = "prod"
	PRESETS_DEV     = "dev"
	PRESETS_NOP     = "nop"
)

Variables

This section is empty.

Functions

func NewLoggerOption

func NewLoggerOption() *runtimeOption

Types

type TimeFormater

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

timeformater define thime formater

func NewTimeFormater

func NewTimeFormater(pattern string) *TimeFormater

func (*TimeFormater) CustomTimeEncoder

func (myself *TimeFormater) CustomTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)

func (*TimeFormater) SetPattern

func (myself *TimeFormater) SetPattern(newPattern string)

func (*TimeFormater) SetTimeZone

func (myself *TimeFormater) SetTimeZone(newTimezone string)

type ZapFactoryRegister

type ZapFactoryRegister struct {
}

ZapFactoryRegister

func (*ZapFactoryRegister) CreateLogger

func (myself *ZapFactoryRegister) CreateLogger(multiopts ...loggercom.Option) ([]loggercom.Logger, error)

CreateLogger add logger name string

func (*ZapFactoryRegister) CreateStructBean

func (myself *ZapFactoryRegister) CreateStructBean() loggercom.StructBean

type ZapLayout

type ZapLayout interface {
	loggercom.Layout

	BuildEncoder() zapcore.Encoder
}

zapLayout custom layout

Directories

Path Synopsis
test

Jump to

Keyboard shortcuts

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