fluent

package module
v2.0.0-...-7571109 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger is fluent logger sdk.

func NewLogger

func NewLogger(addr string, opts ...Option) (*Logger, error)

NewLogger new a std logger with options. target:

tcp://127.0.0.1:24224
unix://var/run/fluent/fluent.sock

func (*Logger) Close

func (l *Logger) Close() error

Close close the logger.

func (*Logger) Log

func (l *Logger) Log(level log.Level, keyvals ...interface{}) error

Log print the kv pairs log.

type Option

type Option func(*options)

Option is fluentd logger option.

func WithAsync

func WithAsync(async bool) Option

WithAsync with config Async.

func WithBufferLimit

func WithBufferLimit(bufferLimit int) Option

WithBufferLimit with config BufferLimit.

func WithForceStopAsyncSend

func WithForceStopAsyncSend(forceStopAsyncSend bool) Option

WithForceStopAsyncSend with config ForceStopAsyncSend.

func WithMaxRetry

func WithMaxRetry(maxRetry int) Option

WithMaxRetry with config MaxRetry.

func WithMaxRetryWait

func WithMaxRetryWait(maxRetryWait int) Option

WithMaxRetryWait with config MaxRetryWait.

func WithRetryWait

func WithRetryWait(retryWait int) Option

WithRetryWait with config RetryWait.

func WithTagPrefix

func WithTagPrefix(tagPrefix string) Option

WithTagPrefix with config TagPrefix.

func WithTimeout

func WithTimeout(timeout time.Duration) Option

WithTimeout with config Timeout.

func WithWriteTimeout

func WithWriteTimeout(writeTimeout time.Duration) Option

WithWriteTimeout with config WriteTimeout.

Jump to

Keyboard shortcuts

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