logger

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	B  = ByteSize(1)
	KB = ByteSize(1024)
	MB = KB * 1024
	GB = MB * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ByteSize

type ByteSize int64

type FLogger

type FLogger struct {
	// 标准输出流日志
	Stdout io.Writer
	Stderr io.Writer
	// 日志备份数量
	Backups int
	// 日志文件大小
	Maxbytes ByteSize
	// 把 stderr 重定向到 stdout,默认 false,错误日志也会写进Stdout中
	Redirect bool
}

Frigate 的日志数据

func DefaultLogger

func DefaultLogger() *FLogger

基于标准输出流,构造一个日志控制器

func (*FLogger) Apply

func (f *FLogger) Apply(cmd *exec.Cmd) error

*

  • 应用logger配置,包括重定向输出流及启用文件清理相关功能

Jump to

Keyboard shortcuts

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