log

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(format string, args ...any)

func Error

func Error(format string, args ...any)

func Fatal

func Fatal(format string, args ...any)

func GetLogger

func GetLogger() *zap.Logger

func Info

func Info(format string, args ...any)

func NewZapLogger

func NewZapLogger(opts ...Option) *zap.Logger

func ParseLevel

func ParseLevel(level string) zapcore.Level

func Setup

func Setup(opts ...Option)

func Warn

func Warn(format string, args ...any)

Types

type Config

type Config struct {
	Level      string
	Format     string
	Filename   string
	MaxSize    int
	MaxBackups int
	MaxAge     int
	Compress   bool
}

type Option

type Option func(*Config)

func WithFilename

func WithFilename(filename string) Option

func WithFormat

func WithFormat(format string) Option

func WithLevel

func WithLevel(level string) Option

func WithMaxAge

func WithMaxAge(maxAge int) Option

func WithMaxBackups

func WithMaxBackups(maxBackups int) Option

func WithMaxSize

func WithMaxSize(maxSize int) Option

Jump to

Keyboard shortcuts

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