Documentation
¶
Index ¶
- Variables
- func Exists(haystack map[string]interface{}, needle string) bool
- func ExpandNested(key string, value interface{}, dest map[string]interface{})
- func GetDockerCID() string
- func GetLogrusCaller() *callstack.FrameInfo
- func RequestToMap(req *http.Request) map[string]interface{}
- func ToFields(items map[string]string) logrus.Fields
- type JSONFormater
- type LogRecord
- type Number
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultFormatter = NewJSONFormater()
Functions ¶
func ExpandNested ¶
func GetDockerCID ¶ added in v1.3.0
func GetDockerCID() string
func GetLogrusCaller ¶
Returns the file, function and line number of the function that called logrus
func RequestToMap ¶
Given a *http.Request return a map with detailed information about the request
Types ¶
type JSONFormater ¶ added in v1.3.0
type JSONFormater struct {
// contains filtered or unexported fields
}
func NewJSONFormater ¶ added in v1.3.0
func NewJSONFormater() *JSONFormater
type LogRecord ¶
type LogRecord struct { Context map[string]interface{} `json:"context,omitempty"` Category string `json:"category,omitempty"` AppName string `json:"appname"` HostName string `json:"hostname"` LogLevel string `json:"logLevel"` FileName string `json:"filename"` FuncName string `json:"funcName"` LineNo int `json:"lineno"` Message string `json:"message"` Timestamp Number `json:"timestamp"` CID string `json:"cid,omitempty"` PID int `json:"pid,omitempty"` TID string `json:"tid,omitempty"` ExcType string `json:"excType,omitempty"` ExcText string `json:"excText,omitempty"` ExcValue string `json:"excValue,omitempty"` }
func (*LogRecord) FromFields ¶
func (LogRecord) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (LogRecord) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*LogRecord) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*LogRecord) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
Click to show internal directories.
Click to hide internal directories.