go_log

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

go-log

go uber zap log

Documentation

Index

Constants

View Source
const DefalutLogPath = "app.log"

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsoleLogger added in v1.0.4

type ConsoleLogger struct {
}

func (*ConsoleLogger) NewLogComponent added in v1.0.4

func (*ConsoleLogger) NewLogComponent(config ZapLoggerConfig) *zap.Logger

type EnvType

type EnvType int
const (
	//开发环境
	EnvDev EnvType = iota
	//测试环境
	EnvTest
	//预生产环境
	EnvPrePro
	//生产环境
	EnvPro
)

type FileLogger added in v1.0.4

type FileLogger struct {
}

func (*FileLogger) NewLogComponent added in v1.0.4

func (*FileLogger) NewLogComponent(config ZapLoggerConfig) *zap.Logger

type ZapLoggerConfig added in v1.0.4

type ZapLoggerConfig struct {
	LogFilePath string
	Env         EnvType
}

func (*ZapLoggerConfig) InitLogger added in v1.0.4

func (config *ZapLoggerConfig) InitLogger() *zap.Logger

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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