gogo_log

package
v0.0.0-...-30be18a Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: Unlicense Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalLogOnce sync.Once

Functions

func Error

func Error(FileName string, prefix string, content string)

Error 报错文件(文件名,内容)(error)

func LogChanOut

func LogChanOut()

func Write

func Write(FileName string, prefix string, content string)

Write 写入日志 (前缀,文件名,内容)(error)

Types

type Log

type Log struct {
	Path    string                `Testing:"日志的路径"`
	LogChan chan *LogWriteStrings `Testing:"每次写入的日志通过管道的方式进行生成,避免并行操作"`
}

Log 日志配置

var GlobalLogData *Log

type LogWriteStrings

type LogWriteStrings struct {
	Url      string    `Testing:"日志存放位置"`
	FileName string    `Testing:"文件按名"`
	Prefix   string    `Testing:"前缀"`
	Content  string    `Testing:"内容"`
	Ctime    time.Time `Testing:"时间"`
}

LogWriteStrings 将需要写入日志的信息组装

Jump to

Keyboard shortcuts

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