minilog

package module
v0.0.0-...-6e294b7 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

README

minilog

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Environment string // 是否生产环境 (development or production)
	Filename    string // 日志文件路径
	MaxSize     int    // 日志文件的大小(mb)
	MaxBackups  int    // 老日志最大保持数,不填不删
	MaxAge      int    // 老日志最大保持日期(天),不填不删
}

type MiniLog

type MiniLog struct {
	*zap.Logger
}

func New

func New(configArg ...Config) *MiniLog

func (*MiniLog) Close

func (logger *MiniLog) Close()

func (*MiniLog) Debug

func (logger *MiniLog) Debug(msg string, fields ...zap.Field)

func (*MiniLog) Error

func (logger *MiniLog) Error(msg string, fields ...zap.Field)

func (*MiniLog) GetZap

func (logger *MiniLog) GetZap() *zap.Logger

func (*MiniLog) Info

func (logger *MiniLog) Info(msg string, fields ...zap.Field)

func (*MiniLog) Warn

func (logger *MiniLog) Warn(msg string, fields ...zap.Field)

Jump to

Keyboard shortcuts

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