alog

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestIdKey = "request_id"
)

Variables

View Source
var (
	Logger *zap.Logger
	Sugar  *zap.SugaredLogger
)

Functions

func Ctx

func Ctx(ctx context.Context) *zap.Logger

func CtxSugar

func CtxSugar(ctx context.Context) *zap.SugaredLogger

func InitLogger

func InitLogger(applicationName, directory, level, format string) error

InitLogger init Logger and Sugar applicationName directory: log directory level: log level (debug/info/warn/error/panic/fatal) format: log format (console/json)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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