Skip to content

Commit

Permalink
with custom marshaller
Browse files Browse the repository at this point in the history
  • Loading branch information
makasim authored and lestrrat committed Sep 19, 2024
1 parent 2dfef78 commit c66af92
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions buffered.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
// - fluent.WithJSONMarshaler
// - fluent.WithMaxConnAttempts
// - fluent.WithMsgpackMarshaler
// - fluent.WithMarshaller
// - fluent.WithNetwork
// - fluent.WithTagPrefix
// - fluent.WithWriteThreshold
Expand Down
6 changes: 6 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c66af92

Please sign in to comment.