Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudWatchLogsHook ¶
type CloudWatchLogsHook struct {
// contains filtered or unexported fields
}
CloudWatchLogsHook is used to store configuration settings for and log messages to Amazon CloudWatch.
func NewCloudWatchLogsHook ¶
func NewCloudWatchLogsHook(config aws.Config, group, stream string, options ...CloudWatchLogsHookOption) ( *CloudWatchLogsHook, error)
NewCloudWatchLogsHook creates a new hook for sending log message to Amazon CloudWatch Logs.
func (*CloudWatchLogsHook) Fire ¶
func (h *CloudWatchLogsHook) Fire(entry *logrus.Entry) error
Fire is called every time an entry needs to be written to the log.
func (*CloudWatchLogsHook) Levels ¶
func (h *CloudWatchLogsHook) Levels() []logrus.Level
Levels returns the valid levels for the hook.
type CloudWatchLogsHookOption ¶
type CloudWatchLogsHookOption func(*CloudWatchLogsHook)
CloudWatchLogsHookOption is used for creation of optional settings functions.
func WithBatchDuration ¶
func WithBatchDuration(frequency time.Duration) CloudWatchLogsHookOption
WithBatchDuration specifies the frequency with which to upload messages to Amazon CloudWatch. If this option is not specified, messages are uploaded immediately.
func WithGroupKmsKeyID ¶
func WithGroupKmsKeyID(id string) CloudWatchLogsHookOption
WithGroupKmsKeyID sets the Amazon KMS key ID to use for encryption of log data. This is only valid if the log group is being created and does not already exist.
func WithGroupRetentionDays ¶
func WithGroupRetentionDays(days int32) CloudWatchLogsHookOption
WithGroupRetentionDays sets the number of days to retain logs for the log group. This is only valid if the log group is being created and does not already exist.
func WithGroupTags ¶
func WithGroupTags(tags map[string]string) CloudWatchLogsHookOption
WithGroupTags sets any tags to associate with the log group. This is only valid if the log group is being created and does not already exist.