logger

package
v0.0.0-...-5870833 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudWatchLogger

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

CloudWatchLogger is a Logger that stores log entries in CloudWatch Logs. Logs are automatically batched for a short period of time before being sent.

func NewCloudWatchLogger

func NewCloudWatchLogger(logGroupName string, retention int, nrApp newrelic.Application) (*CloudWatchLogger, error)

NewCloudWatchLogger returns a CloudWatchLogger that is ready to be used.

func (*CloudWatchLogger) Log

func (cwl *CloudWatchLogger) Log(t time.Time, s string)

Log enqueues a log entry to be stored in CloudWatch Logs.

func (*CloudWatchLogger) Stop

func (cwl *CloudWatchLogger) Stop()

Stop flushes all pending logs and blocks until they are sent to CloudWatch Logs.

type Logger

type Logger interface {
	Log(t time.Time, s string)
	Stop()
}

The Logger interface defines the minimum set of functions any logger must implement.

Jump to

Keyboard shortcuts

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