Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 1001 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 1001 Bytes

Logruseq

A Seq hook for Logrus

Build Status Go Report Card GoDoc

Install

go get -u github.com/nullseed/logruseq

Usage

package main

import (
	"github.com/nullseed/logruseq"
	log "github.com/sirupsen/logrus"
)

func main() {
	log.AddHook(logruseq.NewSeqHook("http://localhost:5341"))

	// Or optionally use the hook with an API key:
	// log.AddHook(logruseq.NewSeqHook("http://localhost:5341",
	// 	logruseq.OptionAPIKey("N1ncujiT5pYGD6m4CF0")))

	log.WithFields(log.Fields{
		"animal": "walrus",
	}).Info("A walrus appears")
}