formatter

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 11 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StripCtlAndExtFromUnicode

func StripCtlAndExtFromUnicode(str string) string

StripCtlAndExtFromUnicode Advanced Unicode normalization and filtering, see http://blog.golang.org/normalization and http://godoc.org/golang.org/x/text/unicode/norm for more details.

Types

type DefaultFormatter

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

DefaultFormatter 默认日志格式化

func NewDefaultCleanFormatter

func NewDefaultCleanFormatter(colorful bool) *DefaultFormatter

NewDefaultCleanFormatter create a new default LogFormatter

func NewDefaultFormatter

func NewDefaultFormatter(colorful bool) *DefaultFormatter

NewDefaultFormatter create a new default LogFormatter

func (DefaultFormatter) Format

func (formatter DefaultFormatter) Format(f event.Event) string

Format 日志格式化

type Formatter

type Formatter interface {
	// Format 日志格式化
	Format(f event.Event) string
}

Formatter 日志格式化接口

type JSONFormatter

type JSONFormatter struct{}

JSONFormatter json输格式化

func NewJSONFormatter

func NewJSONFormatter() *JSONFormatter

NewJSONFormatter create a new json LogFormatter

func (JSONFormatter) Format

func (formatter JSONFormatter) Format(f event.Event) string

Format 日志格式化

type JSONWithTimeFormatter

type JSONWithTimeFormatter struct{}

JSONWithTimeFormatter json输格式化

func NewJSONWithTimeFormatter

func NewJSONWithTimeFormatter() *JSONWithTimeFormatter

NewJSONWithTimeFormatter create a new json LogFormatter

func (JSONWithTimeFormatter) Format

func (formatter JSONWithTimeFormatter) Format(f event.Event) string

Format 日志格式化

Jump to

Keyboard shortcuts

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