Documentation ¶
Overview ¶
Package slackrus provides a Hipchat hook for the logrus loggin package.
Index ¶
Constants ¶
View Source
const (
VERISON = "0.0.2"
)
Project version
Variables ¶
View Source
var AllLevels = []logrus.Level{ logrus.DebugLevel, logrus.InfoLevel, logrus.WarnLevel, logrus.ErrorLevel, logrus.FatalLevel, logrus.PanicLevel, }
Supported log levels
Functions ¶
Types ¶
type SlackrusHook ¶
type SlackrusHook struct { // Messages with a log level not contained in this array // will not be dispatched. If nil, all messages will be dispatched. AcceptedLevels []logrus.Level HookURL string IconURL string Channel string IconEmoji string Username string // contains filtered or unexported fields }
SlackrusHook is a logrus Hook for dispatching messages to the specified channel on Slack.
func (*SlackrusHook) Fire ¶
func (sh *SlackrusHook) Fire(e *logrus.Entry) error
Fire - Sent event to slack
func (*SlackrusHook) Levels ¶
func (sh *SlackrusHook) Levels() []logrus.Level
Levels sets which levels to sent to slack
Click to show internal directories.
Click to hide internal directories.