Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ServiceName = ""
ServiceName name of service
Functions ¶
Types ¶
type StructuredLog ¶
type StructuredLog struct { Timestamp string `json:"@timestamp,omitempty"` Service string `json:"service,omitempty"` Thread string `json:"thread,omitempty"` IP string `json:"ip,omitempty"` Env string `json:"env,omitempty"` Server string `json:"server,omitempty"` Path string `json:"path,omitempty"` Level string `json:"level,omitempty"` Event string `json:"event,omitempty"` Message string `json:"message,omitempty"` Account string `json:"account,omitempty"` ID string `json:"id,omitempty"` Raw string `json:"raw,omitempty"` RawInterface interface{} `json:"rawInterface,omitempty"` }
StructuredLog struct for structured loggin
func (*StructuredLog) Error ¶ added in v1.0.4
func (thelog *StructuredLog) Error(event, msg string)
Error log error with event name
func (*StructuredLog) EventTag ¶ added in v1.0.5
func (thelog *StructuredLog) EventTag(event string)
EventTag log info only with event name
func (*StructuredLog) Fatal ¶ added in v1.0.4
func (thelog *StructuredLog) Fatal(event string, err error)
Fatal log error with event name and call log.Fatal()
Click to show internal directories.
Click to hide internal directories.