logutils

package
v0.0.0-...-6ae8573 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefalutLogPath = "app.log"
)

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(opts ...Option) *lumberjack.Logger

func NewZapEncoderConfig

func NewZapEncoderConfig() zapcore.Encoder

Types

type Level

type Level string
const (
	LevelTrace  Level = "trace"
	LevelDebug  Level = "debug"
	LevelInfo   Level = "info"
	LevelNotice Level = "notice"
	LevelWarn   Level = "warn"
	LevelError  Level = "error"
	LevelFatal  Level = "fatal"
)

func (Level) KitexLogLevel

func (level Level) KitexLogLevel() klog.Level

KitexLogLevel return kitex log level

type LumberjackConfig

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

func DefaulutLumberjackConfig

func DefaulutLumberjackConfig() *LumberjackConfig

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithLumberjackCompress

func WithLumberjackCompress(compress bool) Option

func WithLumberjackFilename

func WithLumberjackFilename(filename string) Option

func WithLumberjackLocalTime

func WithLumberjackLocalTime(localTime bool) Option

func WithLumberjackMaxAge

func WithLumberjackMaxAge(maxAge int) Option

func WithLumberjackMaxBackups

func WithLumberjackMaxBackups(maxBackups int) Option

func WithLumberjackMaxSize

func WithLumberjackMaxSize(maxSize int) Option

Jump to

Keyboard shortcuts

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