sdlog

package module
v0.0.0-...-3dbef0f Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2017 License: MIT Imports: 4 Imported by: 0

README

SDLog

Go Doc Go Report Card

Package provides logrus hooks for google stackdriver logging.

In particular, it uses the go library provided by google cloud go docs to log to Google Stackdriver Logging. Refer to Application Default Credentials for how to perform authorization.

Usage
hook, err := sdlog.NewHook("my-project-id")
if err != nil {}
logrus.Hooks.Add(hook)

External References

logrus MIT

google cloud Apache 2.0

Documentation

Overview

Package sdlog

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook struct {
	// contains filtered or unexported fields
}

Hook ...

func NewHook

func NewHook(projectID, serviceName string) (*Hook, error)

NewHook ...

func (*Hook) Fire

func (hook *Hook) Fire(entry *logrus.Entry) error

Fire ...

func (*Hook) Levels

func (hook *Hook) Levels() []logrus.Level

Levels ...

Jump to

Keyboard shortcuts

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