Documentation ¶
Index ¶
- type Config
- type KinesisHook
- func (h *KinesisHook) AddFilter(name string, fn func(interface{}) interface{})
- func (h *KinesisHook) AddIgnore(name string)
- func (h *KinesisHook) Async()
- func (h *KinesisHook) Fire(entry *logrus.Entry) error
- func (h *KinesisHook) Levels() []logrus.Level
- func (h *KinesisHook) SetLevels(levels []logrus.Level)
- func (h *KinesisHook) SetPartitionKey(key string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KinesisHook ¶
type KinesisHook struct {
// contains filtered or unexported fields
}
KinesisHook is logrus hook for AWS kinesis.
func New ¶
func New(name string, conf Config) (*KinesisHook, error)
New returns initialized logrus hook for fluentd with persistent fluentd logger.
func NewWithAWSConfig ¶
func NewWithAWSConfig(name string, conf *aws.Config) (*KinesisHook, error)
NewWithConfig returns initialized logrus hook for fluentd with persistent fluentd logger.
func (*KinesisHook) AddFilter ¶
func (h *KinesisHook) AddFilter(name string, fn func(interface{}) interface{})
AddFilter adds a custom filter function.
func (*KinesisHook) AddIgnore ¶
func (h *KinesisHook) AddIgnore(name string)
AddIgnore adds field name to ignore.
func (*KinesisHook) Async ¶
func (h *KinesisHook) Async()
Async sets async flag and send log asynchroniously. If use this option, Fire() does not return error.
func (*KinesisHook) Fire ¶
func (h *KinesisHook) Fire(entry *logrus.Entry) error
Fire is invoked by logrus and sends log to kinesis.
func (*KinesisHook) Levels ¶
func (h *KinesisHook) Levels() []logrus.Level
Levels returns logging level to fire this hook.
func (*KinesisHook) SetLevels ¶
func (h *KinesisHook) SetLevels(levels []logrus.Level)
SetLevels sets logging level to fire this hook.
func (*KinesisHook) SetPartitionKey ¶
func (h *KinesisHook) SetPartitionKey(key string)
SetPartitionKey sets default partitionKey for kinesis.
Click to show internal directories.
Click to hide internal directories.