Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logzio boolean fields #1800

Merged
merged 1 commit into from
Sep 9, 2024
Merged
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
4 changes: 2 additions & 2 deletions docs/configuration/plugins/outputs/logz.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
4 changes: 2 additions & 2 deletions pkg/sdk/logging/model/output/logz.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 4 additions & 3 deletions pkg/sdk/logging/model/output/logz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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
Expand All @@ -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
Expand Down
10 changes: 10 additions & 0 deletions pkg/sdk/logging/model/output/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading