hiprus

package module
v0.0.0-...-286f0b5 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2015 License: BSD-3-Clause Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 1.0.2

Documentation

Overview

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

Index

Constants

View Source
const (
	VERSION = "1.0.2"
)

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
	// 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
⌂ 换网址