@@ -17,13 +17,13 @@ type batchLogger struct {
17
17
18
18
// BatchLoggerOptions is an options struct used by the NewBatchLogger constructor
19
19
type BatchLoggerOptions struct {
20
- MaxBatchSize int // The maximum size of a batch in bytes
21
- MaxLogAge time.Duration // The maximum age of a log item in a batch - once an item is older than this, the batch is passed to the callback
22
- LogApiKey string // The API key used by the default BatchCallback used to send logs to the Firetail logging API
23
- LogApiUrl string // The URL of the Firetail logging API endpoint to send log entries to
24
- RedactRequestJSONPayloadValues bool // Whether or not values in the request payloads should be redacted, assuming they're JSON
25
- RedactResponseJSONPayloadValues bool // Whether or not values in the response payloads should be redacted, assuming they're JSON
26
- BatchCallback func ([][]byte ) // An optional callback to which batches will be passed; the default callback sends logs to the Firetail logging API
20
+ MaxBatchSize int // The maximum size of a batch in bytes
21
+ MaxLogAge time.Duration // The maximum age of a log item in a batch - once an item is older than this, the batch is passed to the callback
22
+ LogApiKey string // The API key used by the default BatchCallback used to send logs to the Firetail logging API
23
+ LogApiUrl string // The URL of the Firetail logging API endpoint to send log entries to
24
+ RedactJSONRequestBodies bool // Whether or not values in the request payloads should be redacted, assuming they're JSON
25
+ RedactJSONResponseBodies bool // Whether or not values in the response payloads should be redacted, assuming they're JSON
26
+ BatchCallback func ([][]byte ) // An optional callback to which batches will be passed; the default callback sends logs to the Firetail logging API
27
27
}
28
28
29
29
// NewBatchLogger creates a new batchLogger with the provided options
@@ -33,8 +33,8 @@ func NewBatchLogger(options BatchLoggerOptions) *batchLogger {
33
33
maxBatchSize : options .MaxBatchSize ,
34
34
maxLogAge : options .MaxLogAge ,
35
35
batchCallback : options .BatchCallback ,
36
- redactRequestBodies : options .RedactRequestJSONPayloadValues ,
37
- redactResponseBodies : options .RedactResponseJSONPayloadValues ,
36
+ redactRequestBodies : options .RedactJSONRequestBodies ,
37
+ redactResponseBodies : options .RedactJSONResponseBodies ,
38
38
}
39
39
40
40
if options .BatchCallback == nil {
0 commit comments