diff --git a/docs/configuration/plugins/outputs/logz.md b/docs/configuration/plugins/outputs/logz.md index 6f34a3494..5b9139312 100644 --- a/docs/configuration/plugins/outputs/logz.md +++ b/docs/configuration/plugins/outputs/logz.md @@ -69,12 +69,12 @@ Should the plugin ship the logs in gzip compression. Default is false. Timeout in seconds that the http persistent connection will stay open without traffic. -### output_include_tags (bool, optional) {#logzio-output_include_tags} +### output_include_tags (*bool, optional) {#logzio-output_include_tags} Should the appender add the fluentd tag to the document, called "fluentd_tag" -### output_include_time (bool, optional) {#logzio-output_include_time} +### output_include_time (*bool, optional) {#logzio-output_include_time} Should the appender add a timestamp to your logs on their process time (recommended). diff --git a/pkg/sdk/logging/model/output/logz.go b/pkg/sdk/logging/model/output/logz.go index 1d8fad38f..256c53038 100644 --- a/pkg/sdk/logging/model/output/logz.go +++ b/pkg/sdk/logging/model/output/logz.go @@ -71,9 +71,9 @@ type LogZOutput struct { // Define LogZ endpoint URL Endpoint *Endpoint `json:"endpoint"` // Should the appender add a timestamp to your logs on their process time (recommended). - OutputIncludeTime bool `json:"output_include_time,omitempty"` + OutputIncludeTime *bool `json:"output_include_time,omitempty"` // Should the appender add the fluentd tag to the document, called "fluentd_tag" - OutputIncludeTags bool `json:"output_include_tags,omitempty"` + OutputIncludeTags *bool `json:"output_include_tags,omitempty"` // Timeout in seconds that the http persistent connection will stay open without traffic. HTTPIdleTimeout int `json:"http_idle_timeout,omitempty"` // How many times to resend failed bulks. diff --git a/pkg/sdk/logging/model/output/logz_test.go b/pkg/sdk/logging/model/output/logz_test.go index 4f3ed1c7f..ea32b5a2f 100644 --- a/pkg/sdk/logging/model/output/logz_test.go +++ b/pkg/sdk/logging/model/output/logz_test.go @@ -18,9 +18,10 @@ import ( "testing" "github.com/ghodss/yaml" + "github.com/stretchr/testify/require" + "github.com/kube-logging/logging-operator/pkg/sdk/logging/model/output" "github.com/kube-logging/logging-operator/pkg/sdk/logging/model/render" - "github.com/stretchr/testify/require" ) func TestLogZ(t *testing.T) { @@ -30,7 +31,7 @@ endpoint: token: value: 1234 http_idle_timeout: 10 -output_include_tags: true +output_include_tags: false output_include_time: true retry_count: 4 retry_sleep: 2 @@ -49,7 +50,7 @@ buffer: endpoint_url https://listener.logz.io:8071?token=1234 gzip true http_idle_timeout 10 - output_include_tags true + output_include_tags false output_include_time true retry_count 4 retry_sleep 2 diff --git a/pkg/sdk/logging/model/output/zz_generated.deepcopy.go b/pkg/sdk/logging/model/output/zz_generated.deepcopy.go index 6c0ebc29d..49c6f85ba 100644 --- a/pkg/sdk/logging/model/output/zz_generated.deepcopy.go +++ b/pkg/sdk/logging/model/output/zz_generated.deepcopy.go @@ -991,6 +991,16 @@ func (in *LogZOutput) DeepCopyInto(out *LogZOutput) { *out = new(Endpoint) (*in).DeepCopyInto(*out) } + if in.OutputIncludeTime != nil { + in, out := &in.OutputIncludeTime, &out.OutputIncludeTime + *out = new(bool) + **out = **in + } + if in.OutputIncludeTags != nil { + in, out := &in.OutputIncludeTags, &out.OutputIncludeTags + *out = new(bool) + **out = **in + } if in.Buffer != nil { in, out := &in.Buffer, &out.Buffer *out = new(Buffer)