logger

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLevel = Level(zap.DebugLevel)
	InfoLevel  = Level(zap.InfoLevel)
	WarnLevel  = Level(zap.WarnLevel)
	ErrorLevel = Level(zap.ErrorLevel)
)

Variables

View Source
var (
	DefaultLogger      *zap.Logger
	DefaultSugarLogger *zap.SugaredLogger
)

Functions

func Debugf

func Debugf(fmt string, args ...interface{})

func Debugw

func Debugw(msg string, keysAndValues ...interface{})

func Errorf

func Errorf(fmt string, args ...interface{})

func Errorw

func Errorw(msg string, keysAndValues ...interface{})

func Infof

func Infof(fmt string, args ...interface{})

func Infow

func Infow(msg string, keysAndValues ...interface{})

func InitWithConfig

func InitWithConfig(config Config) error

func Warnf

func Warnf(fmt string, args ...interface{})

func Warnw

func Warnw(msg string, keysAndValues ...interface{})

Types

type Config

type Config struct {
	AppName   string
	DebugMode DebugModeType
}

type DebugModeType

type DebugModeType int
const (
	DebugModeFromEnv DebugModeType = iota
	DebugModeOff
	DebugModeOn
)

type Level

type Level zapcore.Level

Jump to

Keyboard shortcuts

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