logs

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Describe

func Describe(ctx context.Context, logGroupNamePrefix *string, c cloudwatchlogsiface.CloudWatchLogsAPI) ([]*cloudwatchlogs.LogGroup, error)

Describe returns details for log groups

func SetRetention

func SetRetention(logGroupName string, retentionDays int64, c cloudwatchlogsiface.CloudWatchLogsAPI) error

SetRetention sets retention for CloudWatch log group retentionDays - the number of days to retain the log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653.

func WriteLogEvents added in v0.4.0

func WriteLogEvents(ctx context.Context, logGroupName string, startTime, endTime time.Time, c cloudwatchlogsiface.CloudWatchLogsAPI, writer *csv.Writer) error

Types

type LogEvent added in v0.3.0

type LogEvent struct {
	Timestamp     *int64
	Message       *string
	LogStreamName *string
}

type LogGroupSummary

type LogGroupSummary struct {
	// The log groups.
	LogGroups []*cloudwatchlogs.LogGroup

	// The number of gigabytes stored.
	StoredGigaBytes *int64
	// The number of gigabytes stored.
	StoredMegaBytes *int64
	// The number of terabytes stored.
	StoredTeraBytes *int64
}

func Summary

func Summary(logGroups []*cloudwatchlogs.LogGroup) *LogGroupSummary

Summary sums up stored bytes and converts them to GB

Jump to

Keyboard shortcuts

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