logger

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log interface {
	QueueLen() int           //日志消息队列长度
	Println(messages []byte) //日志输出方法实现
}

type LogStandard

type LogStandard struct {
	PrintlnFunc func(messages []byte) //日志输出方法实现
}

func (*LogStandard) Println

func (it *LogStandard) Println(v []byte)

日志输出方法实现

func (*LogStandard) QueueLen

func (it *LogStandard) QueueLen() int

日志消息队列长度

type LogSystem

type LogSystem struct {
	// contains filtered or unexported fields
}

func (*LogSystem) Close

func (it *LogSystem) Close() error

关闭日志系统和队列

func (LogSystem) New

func (it LogSystem) New(logImpl Log, queueLen int) (LogSystem, error)

logImpl:日志实现类,queueLen:消息队列缓冲长度

func (*LogSystem) SendLog

func (it *LogSystem) SendLog(logs ...string) error

日志发送者

Jump to

Keyboard shortcuts

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