formatter

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFormatter_Json

func NewFormatter_Json() logrus.Formatter

func NewFormatter_Text

func NewFormatter_Text() logrus.Formatter

Types

type JsonFormatter

type JsonFormatter struct{}

func (JsonFormatter) Format

func (f JsonFormatter) Format(entry *logrus.Entry) ([]byte, error)

type LogData

type LogData struct {
	Time    string `json:"Time,omitempty"`
	Level   string `json:"Level,omitempty"`
	Message string `json:"Message,omitempty"`
	Tag     string `json:"Tag,omitempty"`
	Caller  string `json:"Caller,omitempty"`
	Stack   string `json:"Stack,omitempty"`
}

func (*LogData) Init

func (obj *LogData) Init(entry *logrus.Entry)

func (*LogData) Json

func (obj *LogData) Json() ([]byte, error)

func (*LogData) Text

func (obj *LogData) Text() (data []byte, err error)

type TextFormatter

type TextFormatter struct{}

func (TextFormatter) Format

func (f TextFormatter) Format(entry *logrus.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

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