Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/logging/fluentd_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func parseFluentdConfig(config map[string]string) (fluent.Config, error) {
}
bufferLimit = int(parsedBufferLimit)
}
retryWait := int(defaultRetryWait)
retryWait := int(defaultRetryWait.Milliseconds())
if config[fluentdRetryWait] != "" {
temp, err := time.ParseDuration(config[fluentdRetryWait])
if err != nil {
Expand Down
18 changes: 9 additions & 9 deletions pkg/logging/fluentd_logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func TestParseFluentdConfig(t *testing.T) {
FluentNetwork: defaultProtocol,
FluentSocketPath: "",
BufferLimit: defaultBufferLimit,
RetryWait: int(defaultRetryWait),
RetryWait: 1000, // The fluent logger takes milliseconds.
MaxRetry: defaultMaxRetries,
Async: false,
AsyncReconnectInterval: 0,
Expand All @@ -110,7 +110,7 @@ func TestParseFluentdConfig(t *testing.T) {
FluentNetwork: defaultProtocol,
FluentSocketPath: "",
BufferLimit: defaultBufferLimit,
RetryWait: int(defaultRetryWait),
RetryWait: int(defaultRetryWait.Milliseconds()),
MaxRetry: defaultMaxRetries,
Async: false,
AsyncReconnectInterval: 0,
Expand All @@ -127,7 +127,7 @@ func TestParseFluentdConfig(t *testing.T) {
FluentNetwork: defaultProtocol,
FluentSocketPath: "",
BufferLimit: defaultBufferLimit,
RetryWait: int(defaultRetryWait),
RetryWait: int(defaultRetryWait.Milliseconds()),
MaxRetry: defaultMaxRetries,
Async: true,
AsyncReconnectInterval: 0,
Expand All @@ -143,7 +143,7 @@ func TestParseFluentdConfig(t *testing.T) {
FluentNetwork: defaultProtocol,
FluentSocketPath: "",
BufferLimit: defaultBufferLimit,
RetryWait: int(defaultRetryWait),
RetryWait: int(defaultRetryWait.Milliseconds()),
MaxRetry: defaultMaxRetries,
Async: false,
AsyncReconnectInterval: 100,
Expand All @@ -159,7 +159,7 @@ func TestParseFluentdConfig(t *testing.T) {
FluentNetwork: defaultProtocol,
FluentSocketPath: "",
BufferLimit: 1000,
RetryWait: int(defaultRetryWait),
RetryWait: int(defaultRetryWait.Milliseconds()),
MaxRetry: defaultMaxRetries,
Async: false,
AsyncReconnectInterval: 0,
Expand Down Expand Up @@ -191,7 +191,7 @@ func TestParseFluentdConfig(t *testing.T) {
FluentNetwork: defaultProtocol,
FluentSocketPath: "",
BufferLimit: defaultBufferLimit,
RetryWait: int(defaultRetryWait),
RetryWait: int(defaultRetryWait.Milliseconds()),
MaxRetry: 100,
Async: false,
AsyncReconnectInterval: 0,
Expand All @@ -207,7 +207,7 @@ func TestParseFluentdConfig(t *testing.T) {
FluentNetwork: defaultProtocol,
FluentSocketPath: "",
BufferLimit: defaultBufferLimit,
RetryWait: int(defaultRetryWait),
RetryWait: int(defaultRetryWait.Milliseconds()),
MaxRetry: defaultMaxRetries,
Async: false,
AsyncReconnectInterval: 0,
Expand All @@ -223,7 +223,7 @@ func TestParseFluentdConfig(t *testing.T) {
FluentNetwork: defaultProtocol,
FluentSocketPath: "",
BufferLimit: defaultBufferLimit,
RetryWait: int(defaultRetryWait),
RetryWait: int(defaultRetryWait.Milliseconds()),
MaxRetry: defaultMaxRetries,
Async: false,
AsyncReconnectInterval: 0,
Expand All @@ -239,7 +239,7 @@ func TestParseFluentdConfig(t *testing.T) {
FluentNetwork: defaultProtocol,
FluentSocketPath: "",
BufferLimit: defaultBufferLimit,
RetryWait: int(defaultRetryWait),
RetryWait: int(defaultRetryWait.Milliseconds()),
MaxRetry: defaultMaxRetries,
Async: false,
AsyncReconnectInterval: 0,
Expand Down
Loading