logger

package
v0.0.0-...-685a81c Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogLevelMap = map[string]zapcore.Level{
	"DEBUG": zapcore.DebugLevel,
	"INFO":  zapcore.InfoLevel,
	"WARN":  zapcore.WarnLevel,
	"ERROR": zapcore.ErrorLevel,
}

Functions

This section is empty.

Types

type Logger

type Logger interface {
	SetLogLevel(level string)
	Info(args ...interface{})
	Warn(args ...interface{})
	Error(args ...interface{})
	Infof(template string, args ...interface{})
	Warnf(template string, args ...interface{})
	Errorf(template string, args ...interface{})
}

func NewLogger

func NewLogger(fileName, logLevel, serviceName string) Logger

type LoggerConfig

type LoggerConfig struct {
	FileName   string
	Prefix     string // service name
	LogLevel   string
	MaxSize    int
	MaxBackups int
	MaxAge     int
	Compress   bool
}

Jump to

Keyboard shortcuts

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