format

package
v0.0.0-...-781f026 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//DefaultFatalFlag Fatal日志的前缀
	DefaultFatalFlag = "[F]"
	//DefaultErrorFlag Error日志的前缀
	DefaultErrorFlag = "[E]"
	//DefaultWarnFlag Warning日志的前缀
	DefaultWarnFlag = "[W]"
	//DefaultNoticeFlag Notice日志的前缀
	DefaultNoticeFlag = "[N]"
	//DefaultInfoFlag Info日志的前缀
	DefaultInfoFlag = "[I]"
	//DefaultDebugFlag Debug日志的前缀
	DefaultDebugFlag = "[D]"
	//DefaultTraceFlag Trace日志的前缀
	DefaultTraceFlag = "[T]"
)

Variables

This section is empty.

Functions

func NewJSONFormatter

func NewJSONFormatter(logType, host, service, traceIDKey string) logo.Formotter

NewJSONFormatter 创建json格式化器对象 addInfo: 追加的额外信息,如果有

func NewTextFormatter

func NewTextFormatter() logo.Formotter

NewTextFormatter 使用默认配置创建日志对象

Types

This section is empty.

Jump to

Keyboard shortcuts

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