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
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) 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
Click to show internal directories.
Click to hide internal directories.