cloudwatch

package
v2.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchWriter

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

BatchWriter is an io.Writer that batch writes log events to the AWS CloudWatch logs API.

func NewBatchWriter

func NewBatchWriter(groupName, streamName string, cfg *aws.Config) (*BatchWriter, error)

NewBatchWriter creates an unbuffered BatchWriter with the given group and stream.

func NewBatchWriterWithDuration

func NewBatchWriterWithDuration(groupName, streamName string, cfg *aws.Config, batchFrequency time.Duration) (*BatchWriter, error)

NewBatchWriterWithDuration creates a BatchWriter with the given group and stream. To create an unbuffered writer, set batchFrequency to 0.

func (*BatchWriter) Flush

func (w *BatchWriter) Flush() error

Force flushing of currently stored messages

func (*BatchWriter) Write

func (w *BatchWriter) Write(p []byte) (n int, err error)

type LogrusHook

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

LogrusHook implements the logrus.LogrusHook interface, writing lines to its writer.

func NewLogrusHook

func NewLogrusHook(w io.Writer) *LogrusHook

func (*LogrusHook) Fire

func (h *LogrusHook) Fire(entry *logrus.Entry) error

func (*LogrusHook) Flush

func (h *LogrusHook) Flush() error

Force flushing of currently stored messages

func (*LogrusHook) Levels

func (h *LogrusHook) Levels() []logrus.Level

func (*LogrusHook) Sync

func (h *LogrusHook) Sync() error

Function alias for compatibility with zap logging

Jump to

Keyboard shortcuts

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