logger

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseLogger added in v0.1.2

type DatabaseLogger struct {
	*golog.Logger
}

func NewDatabaseLogger added in v0.1.2

func NewDatabaseLogger(logger *golog.Logger) *DatabaseLogger

func (*DatabaseLogger) Panic added in v0.1.2

func (l *DatabaseLogger) Panic(v ...interface{})

func (*DatabaseLogger) Panicf added in v0.1.2

func (l *DatabaseLogger) Panicf(format string, v ...interface{})

type Logger

type Logger struct {
	// 链接名称
	Link string `yaml:"link"`
	// 储存路径
	Path string `yaml:"path"`
	// 文件权限
	Perm fs.FileMode `yaml:"perm"`
	// 是否按天切割日志
	Daily bool `yaml:"daily"`
	// 单个文件大小
	Size int64 `yaml:"size"`
	// 文件名前缀
	Prefix string `yaml:"prefix"`
	// contains filtered or unexported fields
}

func New

func New() *Logger

func (*Logger) Close

func (l *Logger) Close()

func (*Logger) Handle

func (l *Logger) Handle(*golog.Log) bool

func (*Logger) Open

func (l *Logger) Open() (*os.File, error)

Jump to

Keyboard shortcuts

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