Documentation
¶
Index ¶
- func NewLogger(cfg *conf.Logger) (bLogger.Logger, error)
- type Logger
- func (l *Logger) Close() error
- func (l *Logger) Debug(_ context.Context, msg string, keyvals ...any)
- func (l *Logger) Error(_ context.Context, msg string, keyvals ...any)
- func (l *Logger) Info(_ context.Context, msg string, keyvals ...any)
- func (l *Logger) Warn(_ context.Context, msg string, keyvals ...any)
- func (l *Logger) With(keyvals ...any) bLogger.Logger
- type Option
- func WithAsync(async bool) Option
- func WithBufferLimit(bufferLimit int) Option
- func WithForceStopAsyncSend(forceStopAsyncSend bool) Option
- func WithMaxRetry(maxRetry int) Option
- func WithMaxRetryWait(maxRetryWait int) Option
- func WithRetryWait(retryWait int) Option
- func WithTagPrefix(tagPrefix string) Option
- func WithTimeout(timeout time.Duration) Option
- func WithWriteTimeout(writeTimeout time.Duration) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶ added in v0.1.0
type Logger struct {
// contains filtered or unexported fields
}
Logger is fluent logger sdk.
func NewFluentLogger ¶ added in v0.1.0
NewFluentLogger new a std logger with options. target:
tcp://127.0.0.1:24224 unix://var/run/fluent/fluent.sock
type Option ¶ added in v0.1.0
type Option func(*options)
Option is fluentd logger option.
func WithBufferLimit ¶ added in v0.1.0
WithBufferLimit with config BufferLimit.
func WithForceStopAsyncSend ¶ added in v0.1.0
WithForceStopAsyncSend with config ForceStopAsyncSend.
func WithMaxRetry ¶ added in v0.1.0
WithMaxRetry with config MaxRetry.
func WithMaxRetryWait ¶ added in v0.1.0
WithMaxRetryWait with config MaxRetryWait.
func WithRetryWait ¶ added in v0.1.0
WithRetryWait with config RetryWait.
func WithTagPrefix ¶ added in v0.1.0
WithTagPrefix with config TagPrefix.
func WithTimeout ¶ added in v0.1.0
WithTimeout with config Timeout.
func WithWriteTimeout ¶ added in v0.1.0
WithWriteTimeout with config WriteTimeout.
Click to show internal directories.
Click to hide internal directories.