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

TimeKeep param in plugins/parser/regex_types.go incorrect #163

Closed
LQBing opened this issue Nov 2, 2021 · 3 comments
Closed

TimeKeep param in plugins/parser/regex_types.go incorrect #163

LQBing opened this issue Nov 2, 2021 · 3 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@LQBing
Copy link
Contributor

LQBing commented Nov 2, 2021

https://github.com/fluent/fluentbit-operator/blob/master/api/fluentbitoperator/v1alpha2/plugins/parser/regex_types.go

	if re.TimeKeep != nil {
		kvs.Insert("Time_Format", fmt.Sprint(*re.TimeKeep))
	}

It's incorrect! It is not Time_Format true

I find the time Time_Keep value Time_Keep On from fluent default parsers.conf

image

@wenchajun
Copy link
Member

wenchajun commented Nov 2, 2021

Maybe Time_Keep is better.
kvs.Insert("Time_Keep", fmt.Sprint(*re.TimeKeep))

@wanjunlei
Copy link
Collaborator

https://github.com/fluent/fluentbit-operator/blob/master/api/fluentbitoperator/v1alpha2/plugins/parser/regex_types.go

	if re.TimeKeep != nil {
		kvs.Insert("Time_Format", fmt.Sprint(*re.TimeKeep))
	}

It's incorrect! It is not Time_Format true

I find the time Time_Keep value Time_Keep On from fluent default parsers.conf

image

Thank you for this, do you want to commit a PR to resolve this bug?

In addition, fluent bit is written in C language, in C language, on and true all will be converted to 1, so Time_Keep on and Time_Keep true are both correct.

@LQBing
Copy link
Contributor Author

LQBing commented Nov 3, 2021

https://github.com/fluent/fluentbit-operator/blob/master/api/fluentbitoperator/v1alpha2/plugins/parser/regex_types.go

	if re.TimeKeep != nil {
		kvs.Insert("Time_Format", fmt.Sprint(*re.TimeKeep))
	}

It's incorrect! It is not Time_Format true
I find the time Time_Keep value Time_Keep On from fluent default parsers.conf
image

Thank you for this, do you want to commit a PR to resolve this bug?

In addition, fluent bit is written in C language, in C language, on and true all will be converted to 1, so Time_Keep on and Time_Keep true are both correct.

I committed the PR. But I'm not sure is there anything missing.

#164

@LQBing LQBing closed this as completed Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants