Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONReactorLog ¶
type JSONReactorLog struct { Host string `json:",omitempty"` Label string `json:",omitempty"` Hash string `json:",omitempty"` Pid int `json:",omitempty"` RID uint64 `json:",omitempty"` TID uint64 `json:",omitempty"` Line uint64 // Do not omit line number on line 0 Output string `json:",omitempty"` Status string `json:",omitempty"` Error string `json:",omitempty"` Elapse float64 `json:",omitempty"` Timestamp int64 `json:",omitempty"` sync.Mutex // contains filtered or unexported fields }
JSONReactorLog lets you log as json lines.
func NewJSONReactorLog ¶
func NewJSONReactorLog(logStream lib.LogStream, hostname string, rid uint64, tid uint64) *JSONReactorLog
NewJSONReactorLog returns a logger that sends json lines to the specified LogStream
func (*JSONReactorLog) Done ¶
func (rl *JSONReactorLog) Done(err error)
Done write in the logs the elapse time for the current execution
func (*JSONReactorLog) SetHash ¶ added in v1.7.0
func (rl *JSONReactorLog) SetHash(value string)
func (*JSONReactorLog) SetLabel ¶
func (rl *JSONReactorLog) SetLabel(value string)
func (*JSONReactorLog) Start ¶
func (rl *JSONReactorLog) Start(pid int, s string)
Start change status and write the initial command
Click to show internal directories.
Click to hide internal directories.