loger

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loger

type Loger struct {
	Name           string `ini:"name"`             // 当前日志模块名字
	RedirectStderr bool   `ini:"redirect_stderr"`  // 将错误输出,重定向到正常日志
	StdoutFile     string `ini:"stdout_file"`      // 正常日志文件
	StdoutMaxBytes int64  `ini:"stdout_max_bytes"` // 正常日志最大字节数 单位MB
	StdoutBackups  int    `ini:"stdout_backups"`   // 正常日志保存数量
	StderrFile     string `ini:"stderr_file"`      // 错误日志文件
	StderrMaxBytes int64  `ini:"stderr_max_bytes"` // 错误日志最大字节数 单位MB
	StderrBackups  int    `ini:"stderr_backups"`   // 错误日志保存数量
	// contains filtered or unexported fields
}

func Init

func Init(l Loger) (*Loger, error)

func (*Loger) Error

func (l *Loger) Error(i ...interface{})

记录错误日志

func (*Loger) Log

func (l *Loger) Log(i ...interface{})

Log 记录正常日志

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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