Documentation
¶
Overview ¶
Package logging provides a portable logging API with cross-cutting concerns.
Index ¶
- type Logging
- func (l *Logging) CreateLogGroup(ctx context.Context, config driver.LogGroupConfig) (*driver.LogGroupInfo, error)
- func (l *Logging) CreateLogStream(ctx context.Context, logGroup, streamName string) (*driver.LogStreamInfo, error)
- func (l *Logging) DeleteLogGroup(ctx context.Context, name string) error
- func (l *Logging) DeleteLogStream(ctx context.Context, logGroup, streamName string) error
- func (l *Logging) DeleteMetricFilter(ctx context.Context, logGroup, filterName string) error
- func (l *Logging) DescribeMetricFilters(ctx context.Context, logGroup string) ([]driver.MetricFilterInfo, error)
- func (l *Logging) FilterLogEvents(ctx context.Context, input *driver.FilterLogEventsInput) ([]driver.FilteredLogEvent, error)
- func (l *Logging) GetLogEvents(ctx context.Context, input *driver.LogQueryInput) ([]driver.LogEvent, error)
- func (l *Logging) GetLogGroup(ctx context.Context, name string) (*driver.LogGroupInfo, error)
- func (l *Logging) ListLogGroups(ctx context.Context) ([]driver.LogGroupInfo, error)
- func (l *Logging) ListLogStreams(ctx context.Context, logGroup string) ([]driver.LogStreamInfo, error)
- func (l *Logging) PutLogEvents(ctx context.Context, logGroup, streamName string, events []driver.LogEvent) error
- func (l *Logging) PutMetricFilter(ctx context.Context, cfg *driver.MetricFilterConfig) error
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logging ¶
type Logging struct {
// contains filtered or unexported fields
}
Logging is the portable logging type wrapping a driver with cross-cutting concerns.
func NewLogging ¶
NewLogging creates a new portable Logging wrapping the given driver.
func (*Logging) CreateLogGroup ¶
func (l *Logging) CreateLogGroup(ctx context.Context, config driver.LogGroupConfig) (*driver.LogGroupInfo, error)
CreateLogGroup creates a new log group.
func (*Logging) CreateLogStream ¶
func (l *Logging) CreateLogStream(ctx context.Context, logGroup, streamName string) (*driver.LogStreamInfo, error)
CreateLogStream creates a new log stream in a log group.
func (*Logging) DeleteLogGroup ¶
DeleteLogGroup deletes a log group.
func (*Logging) DeleteLogStream ¶
DeleteLogStream deletes a log stream from a log group.
func (*Logging) DeleteMetricFilter ¶ added in v1.3.2
DeleteMetricFilter deletes a metric filter from a log group.
func (*Logging) DescribeMetricFilters ¶ added in v1.3.2
func (l *Logging) DescribeMetricFilters( ctx context.Context, logGroup string, ) ([]driver.MetricFilterInfo, error)
DescribeMetricFilters lists all metric filters for a log group.
func (*Logging) FilterLogEvents ¶ added in v1.3.2
func (l *Logging) FilterLogEvents( ctx context.Context, input *driver.FilterLogEventsInput, ) ([]driver.FilteredLogEvent, error)
FilterLogEvents filters log events across streams using a pattern.
func (*Logging) GetLogEvents ¶
func (l *Logging) GetLogEvents( ctx context.Context, input *driver.LogQueryInput, ) ([]driver.LogEvent, error)
GetLogEvents retrieves log events matching the query.
func (*Logging) GetLogGroup ¶
GetLogGroup retrieves log group info.
func (*Logging) ListLogGroups ¶
ListLogGroups lists all log groups.
func (*Logging) ListLogStreams ¶
func (l *Logging) ListLogStreams(ctx context.Context, logGroup string) ([]driver.LogStreamInfo, error)
ListLogStreams lists all log streams in a log group.
func (*Logging) PutLogEvents ¶
func (l *Logging) PutLogEvents(ctx context.Context, logGroup, streamName string, events []driver.LogEvent) error
PutLogEvents writes log events to a stream.
func (*Logging) PutMetricFilter ¶ added in v1.3.2
PutMetricFilter creates or updates a metric filter for a log group.
type Option ¶
type Option func(*Logging)
Option configures a portable Logging.
func WithErrorInjection ¶
WithErrorInjection sets the error injector.
func WithMetrics ¶
WithMetrics sets the metrics collector.
func WithRateLimiter ¶
WithRateLimiter sets the rate limiter.