zapcloudwatch

package
v0.0.0-...-d5e3614 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

AllLevels Supported log levels

Functions

func LevelThreshold

func LevelThreshold(l zapcore.Level) []zapcore.Level

LevelThreshold - Returns every logging level above and including the given parameter.

Types

type CloudwatchHook

type CloudwatchHook struct {
	// Messages with a log level not contained in this array
	// will not be dispatched. If nil, all messages will be dispatched.
	AcceptedLevels []zapcore.Level
	GroupName      string
	StreamName     string
	AWSConfig      *aws.Config

	Async bool // if async is true, send a message asynchronously.
	// contains filtered or unexported fields
}

CloudwatchHook is a zap Hook for dispatching messages to the specified

func NewCloudwatchHook

func NewCloudwatchHook(groupName, streamName string, isAsync bool, cfg *aws.Config, level zapcore.Level) *CloudwatchHook

NewCloudwatchHook creates a new zap hook for cloudwatch

func (*CloudwatchHook) GetHook

func (ch *CloudwatchHook) GetHook() (func(zapcore.Entry) error, error)

GetHook function returns hook to zap

func (*CloudwatchHook) Levels

func (ch *CloudwatchHook) Levels() []zapcore.Level

Levels sets which levels to sent to cloudwatch

Jump to

Keyboard shortcuts

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