Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OptionAPIKey ¶
func OptionAPIKey(apiKey string) func(opts *SeqHookOptions)
OptionAPIKey sets the Seq API key option.
func OptionLevels ¶
func OptionLevels(levels []logrus.Level) func(opts *SeqHookOptions)
OptionLevels sets the levels for which Fire will be called.
Types ¶
type SeqHook ¶
type SeqHook struct {
// contains filtered or unexported fields
}
SeqHook sends logs to Seq via HTTP.
func NewSeqHook ¶
func NewSeqHook(host string, opts ...func(*SeqHookOptions)) *SeqHook
NewSeqHook creates a Seq hook for logrus which can send log events to the host specified, for example:
logruseq.NewSeqHook("http://localhost:5341")
Optionally, the hook can be used with an API key, for example:
logruseq.NewSeqHook("http://localhost:5341", logruseq.OptionAPIKey("N1ncujiT5pYGD6m4CF0"))
Optionally, which levels to log can be specified:
logruseq.NewSeqHook("http://localhost:5341", logruseq.OptionLevels([]logrus.Level{ logrus.WarnLevel, logrus.ErrorLevel, logrus.FatalLevel, logrus.PanicLevel, }))
type SeqHookOptions ¶
type SeqHookOptions struct {
// contains filtered or unexported fields
}
SeqHookOptions collects non-default Seq hook options.
Click to show internal directories.
Click to hide internal directories.