log

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebugLevel = zapcore.DebugLevel
	InfoLevel  = zapcore.InfoLevel
	WarnLevel  = zapcore.WarnLevel
	ErrorLevel = zapcore.ErrorLevel
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

type Field = zap.Field

func Float64

func Float64(key string, val float64) Field

func Int

func Int(key string, val int) Field

func String

func String(key, val string) Field

func Uint

func Uint(key string, val uint) Field

type Level

type Level = zapcore.Level

type Logger

type Logger interface {
	Debug(msg string, fields ...Field)
	Info(msg string, fields ...Field)
	Warn(msg string, fields ...Field)
	Error(msg string, fields ...Field)
	Sync() error
}

type LoggerInfo

type LoggerInfo struct {
	Rotation

	Enabled         bool
	Path            string
	TimeStampFormat string
	Level           Level
}

type Ref

type Ref utils.RoProp[Logger]

func NewLogger

func NewLogger(info *LoggerInfo) Ref

type Rotation

type Rotation struct {
	Filename       string
	MaxSizeInMb    int
	MaxNoOfBackups int
	MaxAgeInDays   int
}

Jump to

Keyboard shortcuts

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