meteor/logrusly

Name: logrusly

Owner: Meteor

Description: Loggly Hooks for GO Logrus logger

Forked from: sebest/logrusly

Created: 2015-10-06 21:02:30.0

Updated: 2015-10-06 21:02:31.0

Pushed: 2015-10-06 21:12:16.0

Homepage: null

Size: 93

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Loggly Hooks for Logrus :walrus:

Usage
age main

rt (
"github.com/Sirupsen/logrus"
"github.com/sebest/logrusly"


logglyToken string = "YOUR_LOGGLY_TOKEN"

 main() {
log := logrus.New()
hook := logrusly.NewLogglyHook(logglyToken, "www.hostname.com", logrus.WarnLevel, "tag1", "tag2")
log.Hooks.Add(hook)

log.WithFields(logrus.Fields{
    "name": "joe",
    "age":  42,
}).Error("Hello world!")

// Flush is automatic for panic/fatal
// Just make sure to Flush() before exiting or you may loose up to 5 seconds
// worth of messages.
hook.Flush()


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.