slogger

module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: MIT

README

sLogger

A simple Zap/Sentry logger.

This project makes it easy to log using Zap in combination with Sentry and Loggly.

Usage

To use this project run go get -u github.com/laetificat/slogger. Configure the loggers first by setting the config:

c := slogger.Config{
    Level:  "Info",
    Sentry: slogger.SentryZapOptions{
        Enabled: true,
        Dsn:     "https://somesentrycode.sentry.io",
    },
    Loggly: slogger.LogglyZapOptions{
        Enabled: true,
        Token:   "somelogglyid",
    },
}
slogger.SetConfig(c)

slogger.Error("This is my error message that will appear in Sentry.")
slogger.Info("This is my info message that will appear in Loggly.")

Contributing

See CONTRIBUTING.md

License

See LICENSE.md

Directories

Path Synopsis
pkg
slogger
Package slogger is a combination of Zap and Sentry.
Package slogger is a combination of Zap and Sentry.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL