message

package
v0.2.15 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructFieldIndexMap

func ConstructFieldIndexMap() map[string]int

func GetEntryValues

func GetEntryValues(entry *Entry) []interface{}

Types

type Entry

type Entry struct {
	LogName    string
	FileName   string
	FilePath   string
	TradeId    string
	CallerName string
	CallerLine int
	RoutineId  int64

	Level  level.LogLevel
	Time   time.Time
	Caller *runtime.Frame

	Message interface{}
	ErrMsg  string
}

func (Entry) IsRecordCaller

func (e Entry) IsRecordCaller() bool

type Record

type Record struct {
	Module     string      `json:"module,omitempty"`
	Level      string      `json:"level,omitempty"`
	Datetime   string      `json:"datetime,omitempty"`
	Timestamp  int64       `json:"timestamp,omitempty"`
	FileName   string      `json:"file,omitempty"`
	CallerName string      `json:"caller_name,omitempty"`
	CallerLine int         `json:"caller_line,omitempty"`
	Pid        int         `json:"pid,omitempty"`
	RoutineId  int64       `json:"routine_id,omitempty"`
	Ip         string      `json:"ip,omitempty"`
	HostName   string      `json:"host,omitempty"`
	TradeId    string      `json:"trade_id,omitempty"`
	Message    interface{} `json:"msg,omitempty"`
	ErrMsg     string      `json:"err_msg,omitempty"`
}

func (*Record) Bytes added in v0.2.0

func (r *Record) Bytes(disableHTMLEscape, prettyPrint bool) ([]byte, error)

Jump to

Keyboard shortcuts

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