Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogSplunk ¶
type LogSplunk struct {
Logger string `json:"logger"`
Severity string `json:"serverity"`
Header string `json:"header,omitempty"`
Status int `json:"status"`
Client string `json:"client"`
Latency string `json:"latency"`
LatencyInt int64 `json:"latencyMicro"`
Method string `json:"method"`
Path string `json:"path"`
Error string `json:"error,omitempty"`
}
type SplunkLog ¶
type SplunkLog struct {
Event string `json:"event"`
SourceType string `json:"sourcetype"`
Source string `json:"-"`
Index string `json:"-"`
}
SplunkLog represents the structure of a log event sent to Splunk.
type SplunkLogger ¶
type SplunkLogger struct {
// contains filtered or unexported fields
}
SplunkLogger is a logger that sends logs to Splunk.
func CheckIfSplunkIsWorking ¶
func CheckIfSplunkIsWorking(params *libParams.SplunkParams) (*SplunkLogger, error)
checkIfSplunkIsWorking tests the Splunk connection by sending a test log.
Click to show internal directories.
Click to hide internal directories.