term_plugin

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() common.LoggerPlugin

New 创建实例.

Types

type Formatter

type Formatter struct{}

Formatter 格式化工具.

func (*Formatter) ToByte

func (o *Formatter) ToByte(item *common.Item) (buf []byte)

ToByte 转成 byte 列表.

func (*Formatter) ToString

func (o *Formatter) ToString(item *common.Item) (str string)

ToString 转成 string.

type Plugin

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

Plugin 终端插件, 以同步模式在终端输出日志.

func (*Plugin) GetFormatter

func (o *Plugin) GetFormatter() (formatter common.LoggerFormatter)

GetFormatter 读取格式化工具.

func (*Plugin) Send

func (o *Plugin) Send(item *common.Item)

Send 发送日志.

func (*Plugin) SetFormatter

func (o *Plugin) SetFormatter(formatter common.LoggerFormatter)

SetFormatter 设置格式化工具.

func (*Plugin) Wait

func (o *Plugin) Wait()

Wait 等待所有任务完成.

Jump to

Keyboard shortcuts

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