bzzap

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	File          string
	MaxSize       int  // MB
	MaxBackups    int  // 保留旧文件的最大个数
	MaxAge        int  // days
	Compress      bool // 是否压缩 / 归档旧文件
	IsHideConsole bool // 日志是否在控制台展示
}

type Log

type Log struct {
	IsHideConsole bool // 日志是否在控制台展示
	// contains filtered or unexported fields
}

func New

func New(config *Config) *Log

func (*Log) Debug

func (l *Log) Debug(tag, msg string, err error)

func (*Log) Error

func (l *Log) Error(tag, msg string, err error)

func (*Log) Fatal

func (l *Log) Fatal(tag, msg string, err error)

func (*Log) Info

func (l *Log) Info(tag, msg string, err error)

func (*Log) Panic

func (l *Log) Panic(tag, msg string, err error)

func (*Log) Sync

func (l *Log) Sync() error

func (*Log) Warn

func (l *Log) Warn(tag, msg string, err error)

Jump to

Keyboard shortcuts

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