hiprus

package module
v0.0.0-...-072039c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2016 License: BSD-3-Clause Imports: 3 Imported by: 0

README

hiprus

Package hiprus provides a Hipchat hook for the logrus loggin package.

Please see the documentation.

Example

logrus.AddHook(&hiprus.HiprusHook{
	AuthToken:      "0e73972805c491b08bafef0d62704a",
	AcceptedLevels: hiprus.LevelThreshold(logrus.WarnLevel),
	RoomName:       "DevOps",
	Username:       "ExampleApp",
})

Version 2.0.0

Documentation

Overview

Package hiprus provides a Hipchat hook for the logrus loggin package.

Index

Constants

View Source
const (
	VERSION                   = "2.0.0"
	ColorYellow hipchat.Color = "yellow"
	ColorRed    hipchat.Color = "red"
	ColorGreen  hipchat.Color = "green"
	ColorPurple hipchat.Color = "purple"
	ColorGray   hipchat.Color = "gray"
	ColorRandom hipchat.Color = "random"
)

Variables

Functions

func LevelThreshold

func LevelThreshold(l logrus.Level) []logrus.Level

Returns every logging level above and including the given parameter.

Types

type HiprusHook

type HiprusHook 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
	AuthToken      string
	RoomName       string
	// If empty, "Hiprus" will be used.
	Username string
	// If empty, will point to hipchat cloud
	BaseURL string
	// contains filtered or unexported fields
}

HiprusHook is a logrus Hook for dispatching messages to the specified channel on Hipchat.

func (*HiprusHook) Fire

func (hh *HiprusHook) Fire(e *logrus.Entry) error

func (*HiprusHook) Levels

func (hh *HiprusHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL