/go-logentries

Drop in solution for integrating logentries into your Go app.

Primary LanguageGoMIT LicenseMIT

Logentries logger for Go

GOPHER

MIT GODOC

Drop in solution for integrating logentries into your app. Implements the io.Writer interface so it will easily forward anything logged from the log package will show up in logentries.

Uses channels and buffered goroutines so it's non blocking for most use.

###Example

package main

import (
	"io"
	"log"
	"os"

	"github.com/DDRBoxman/go-logentries"
)

func main() {
	logentriesWriter := logentries.New("XXXX-XXXXXXX-XXXXX-XXX") //Token here
	defer logentriesWriter.Close()

	multiWriter := io.MultiWriter(os.Stderr, logentriesWriter)
	
	log.SetOutput(multiWriter)

	log.Print("test")
	log.Print("test2")
	log.Print("test3")
}