glog

package module
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: MIT Imports: 12 Imported by: 0

README

glog

Documentation

Index

Constants

View Source
const (
	FieldKeyModule = "module"
)

Variables

This section is empty.

Functions

func NewWriterConfigLogstash

func NewWriterConfigLogstash() *adaptor.ConfigLogstash

Types

type Entry added in v0.0.2

type Entry struct {
	logrus.Entry
}

func WithModule added in v0.0.2

func WithModule(module string) *Entry

func (*Entry) WithPanicStack added in v0.0.2

func (e *Entry) WithPanicStack() *Entry

函数在recover层级调用

type Hook

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

func (Hook) Fire

func (l Hook) Fire(entry *logrus.Entry) error

func (Hook) Levels

func (l Hook) Levels() []logrus.Level

type Processor

type Processor struct {
	adaptor.CoreBase
	// contains filtered or unexported fields
}

日志处理类

func NewProcessor

func NewProcessor(appName, modulePrefix string) *Processor

func (*Processor) AddWriters

func (p *Processor) AddWriters(writerConfigs ...adaptor.WriterConfig)

func (*Processor) GetHook

func (p *Processor) GetHook() *Hook

type TextFormatter

type TextFormatter struct {
}

func (TextFormatter) Format

func (t TextFormatter) Format(e *logrus.Entry) (o []byte, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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