zoggly

package module
v0.0.0-...-aa0341a Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2019 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

zoggly (ARCHIVED)

Loggly hooks for GO uber ⚡ Zap logger

Archived

This is probably so out of sync with the main package there's no reason to have it now.

Usage

This example sends to loggly and standard out.

package main

import (
    "github.com/peppage/zoggly"
    "github.com/uber-go/zap"
)

var logglyToken string = "token from source setup"
var logger zap.Logger

func main() {
    zl := NewZapLoggly(logglyToken)
	logger = zap.New(zap.NewJSONEncoder(), zap.ErrorLevel,
		zap.Output(zap.Tee(os.Stdout, zl.GetWriter())))

    // Make sure to flush to send all logs before exiting
    defer zl.Flush()
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZapLoggly

type ZapLoggly struct {
	io.Writer
	// contains filtered or unexported fields
}

func NewZoggly

func NewZoggly(token string, tags ...string) *ZapLoggly

func (*ZapLoggly) Flush

func (z *ZapLoggly) Flush()

func (*ZapLoggly) GetWriter

func (z *ZapLoggly) GetWriter() zap.WriteSyncer

func (*ZapLoggly) Write

func (z *ZapLoggly) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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