diff --git a/buffered.go b/buffered.go index 5fc6dac..8dd5ae3 100644 --- a/buffered.go +++ b/buffered.go @@ -11,16 +11,17 @@ import ( // NewBuffered creates a new Buffered client. // Options may be one of the following: // -// * fluent.WithAddress -// * fluent.WithBufferLimit -// * fluent.WithDialTimeout -// * fluent.WithJSONMarshaler -// * fluent.WithMaxConnAttempts -// * fluent.WithMsgpackMarshaler -// * fluent.WithNetwork -// * fluent.WithTagPrefix -// * fluent.WithWriteThreshold -// * fluent.WithWriteQueueSize +// - fluent.WithAddress +// - fluent.WithBufferLimit +// - fluent.WithDialTimeout +// - fluent.WithJSONMarshaler +// - fluent.WithMaxConnAttempts +// - fluent.WithMsgpackMarshaler +// - fluent.WithMarshaller +// - fluent.WithNetwork +// - fluent.WithTagPrefix +// - fluent.WithWriteThreshold +// - fluent.WithWriteQueueSize // // Please see their respective documentation for details. func NewBuffered(options ...Option) (client *Buffered, err error) { diff --git a/options.go b/options.go index 7b8c383..12fd3cf 100644 --- a/options.go +++ b/options.go @@ -56,6 +56,12 @@ func WithJSONMarshaler() Option { return option.New(identMarshaler{}, marshalFunc(jsonMarshal)) } +// WithMarshaller specifies a custom marshaling to be used when +// sending messages to fluentd. Used for `fluent.New` +func WithMarshaller(m marshaler) Option { + return option.New(identMarshaler{}, m) +} + // WithMsgpackMarshaler specifies msgpack marshaling to be used when // sending messages to fluentd. Used in `fluent.New` func WithMsgpackMarshaler() Option {