Loggly Hooks for GO Logrus logger

Overview

Loggly Hooks for Logrus :walrus:

Usage

package main

import (
	"github.com/sirupsen/logrus"
	"github.com/sebest/logrusly"
)

var logglyToken string = "YOUR_LOGGLY_TOKEN"

func 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()
}
Issues
  • Missing LICENSE

    Missing LICENSE

    If possible could you decide on a license type and add a LICENSE file? I'd love to use this in a project but I require an explicit published license to do so. Thanks!

    opened by mvandiest 5
  • New Trace log level in logrus

    New Trace log level in logrus

    Hello, I'm just opening this issue to let you know, the next release of logrus (v1.2.0) will add a new trace level named Trace below Debug. Here is the PR for reference sirupsen/logrus#844 You may want to take into account this new level.

    opened by dgsb 1
  • Package no longer builds due to segmentio/go-loggly not building

    Package no longer builds due to segmentio/go-loggly not building

    opened by QuinnDamerell-MS 1
  • case-insensitive import collision for logrus

    case-insensitive import collision for logrus

    It looks like Sirupsen/logrus has updated the import path to have a lowercase "s", I am now seeing this error

    case-insensitive import collision: "github.com/Sirupsen/logrus" and "github.com/sirupsen/logrus"

    opened by kylevanek 1
  • Always cast errors to strings

    Always cast errors to strings

    Without this change, errors tend to print as {}, or whatever the exported fields on the concrete implementation of the error are.

    This code borrowed from logrus.JSONFormatter: https://github.com/Sirupsen/logrus/commit/8287db793

    (It would be nice if logrusly could just use JSONFormatter and call client.Write instead of client.Send, but they make slightly different choices for names for the timestamp and message fields, as well as the capitalization of the level.)

    opened by glasser 1
  • Exposing go-loggly .Tag() functionality

    Exposing go-loggly .Tag() functionality

    I need to expose go-loggly's .Tag() functionality because I have a []string of tags and I need to loop through them instead of adding the tags in the NewLogglyHook()

    opened by webRat 1
  • Set if push or ignore host field

    Set if push or ignore host field

    Every message will have host field, It's duplicated and it takes more storage. Add IgnoreHostField(bool) to set if ignore pushing host field, it's false by default.

    opened by bastengao 0
  • Flush() ignores errors

    Flush() ignores errors

    The go-loggly client returns a possible error from Flush, but logrusly ignores it.

    It should return the same error. To not break backward compatibility, perhaps a FlushError() method could be added, which exposes the error?

    opened by flimzy 0
Owner
Sebest
Sebest
Hooks-goreleaser - GoReleaser hooks plugin

?? hooks-goreleaser The GoReleaser integration for go-semantic-release. Usage Us

null 1 Jan 30, 2022
Binalyze logger is an easily customizable wrapper for logrus with log rotation

logger logger is an easily customizable wrapper for logrus with log rotation Usage There is only one function to initialize logger. logger.Init() When

Binalyze 26 Nov 18, 2021
A customized GORM logger that implements the appropriate interface and uses Logrus to output logs

CryptoMath GORM Logger A customized GORM logger that implements the appropriate interface and uses Logrus to output logs. Install go get github.com/ma

Crypto Math 0 Nov 6, 2021
A logrus.Hook that logs with a zap.Logger

zaprus Ever had a 3rd-party dependency requiring a logrus, but you're using zap? zaprus provides a logrus.Hook that makes a logrus.(Entry|Logger) repl

Blox Staking 1 Feb 27, 2022
Convenient Logger interface and std logger wrapper

Convenient logger interface and wrapper around std logger Interface type Logger interface { Error(err error) Debugf(format string, args ...interface

Denis Mitrofanov 1 Nov 28, 2021
Logger - Simple logger without written with std pkg

Go-Logger Simple usage is: package main

MaskedTrench 2 Jan 2, 2022
Logger - A thin wrapper of uber-go/zap logger for personal project

a thin wraper of uber-go/zap logger for personal project 0. thanks uber-go/zap B

tsingson 1 Jun 16, 2022
Logrus is a structured, pluggable logging for Go.

Logrus is a structured logger for Go (golang), completely API compatible with the standard library logger.

Simon Eskildsen 274 May 25, 2021
Simple example of creating an `LD_PRELOAD` library in Go that hooks LibC's main function.

LD_PRELOAD in Go Simple example of creating an LD_PRELOAD library in Go that hooks LibC's main function. Code hooks __libc_start_main to run before th

pat_h/to/file 4 Jan 9, 2022
A logger, for Go

Go-Log A logger, for Go! It's sort of log and code.google.com/p/log4go compatible, so in most cases can be used without any code changes. Breaking cha

Ian Kent 38 May 12, 2022
Simple logger for Go programs. Allows custom formats for messages.

go-logger A simple go logger for easy logging in your programs. Allows setting custom format for messages. Preview Install go get github.com/apsdehal/

Amanpreet Singh 276 Jun 14, 2022
A 12-factor app logger built for performance and happy development

logxi log XI is a structured 12-factor app logger built for speed and happy development. Simpler. Sane no-configuration defaults out of the box. Faste

Mario Gutierrez 348 Jun 25, 2022
Dead simple, super fast, zero allocation and modular logger for Golang

Onelog Onelog is a dead simple but very efficient JSON logger. It is one of the fastest JSON logger out there. Also, it is one of the logger with the

Francois Parquet 399 Jun 16, 2022
A logger for Go SQL database driver without modify existing *sql.DB stdlib usage.

SQLDB-Logger A logger for Go SQL database driver without modify existing *sql.DB stdlib usage. Colored console writer output above only for sample/dev

Sarjono Mukti Aji 257 Aug 16, 2022
xlog is a logger for net/context aware HTTP applications

⚠️ Check zerolog, the successor of xlog. HTTP Handler Logger xlog is a logger for net/context aware HTTP applications. Unlike most loggers, xlog will

Olivier Poitrey 135 Nov 22, 2021
Zero Allocation JSON Logger

Zero Allocation JSON Logger The zerolog package provides a fast and simple logger dedicated to JSON output. Zerolog's API is designed to provide both

Olivier Poitrey 6.7k Aug 17, 2022
A powerful zero-dependency json logger.

ZKits Logger Library About This package is a library of ZKits project. This is a zero-dependency standard JSON log library that supports structured JS

Qingshan Luo 18 Aug 10, 2022
Configurable Logger for Go

Timber! This is a logger implementation that supports multiple log levels, multiple output destinations with configurable formats and levels for each.

DeNA SF 66 Jun 28, 2022
A feature-rich and easy to use logger for golang

A feature-rich and easy to use logger for golang ?? Install ?? Common Logs lumber.Success() lumber.Info() lumber.Debug() lumber.Warning()

Matthew Gleich 50 Jul 20, 2022