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

Add support for log lines of any size and glob patterns #22

Merged
merged 2 commits into from
Jun 4, 2021

Conversation

marc-gr
Copy link
Contributor

@marc-gr marc-gr commented Jun 3, 2021

Adds option to set up custom buffer size for the log reader.
Adds support for glob patterns.

Closes #8

@marc-gr marc-gr requested a review from andrewkroh June 3, 2021 14:48
@elasticmachine
Copy link

elasticmachine commented Jun 3, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #22 updated

  • Start Time: 2021-06-04T07:03:29.047+0000

  • Duration: 5 min 26 sec

  • Commit: eb9e3a1

Test stats 🧪

Test Results
Failed 0
Passed 5
Skipped 0
Total 5

Trends 🧪

Image of Build Times

Image of Tests

command/root.go Outdated
@@ -62,6 +62,7 @@ func ExecuteContext(ctx context.Context) error {
rootCmd.PersistentFlags().StringVarP(&opts.StartSignal, "start-signal", "s", "", "wait for start signal")
rootCmd.PersistentFlags().BoolVar(&opts.InsecureTLS, "insecure", false, "disable tls verification")
rootCmd.PersistentFlags().IntVar(&opts.RateLimit, "rate-limit", 500*1024, "bytes per second rate limit for UDP output")
rootCmd.PersistentFlags().IntVar(&opts.LogReaderBuffer, "log-reader-buf", 500*1024, "buffer size in bytes of the log reader")
Copy link
Member

@andrewkroh andrewkroh Jun 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the "maximum size of buffer that may be allocated" during log scanning, correct?

Is this needed to allow scanning lines longer than the default MaxScanTokenSize = 64 * 1024?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, until we have support for multiline I encountered cases where this is needed. Maybe defaulting to 64*1024 is enough though.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with making it bigger. Can you change the description to indicate this is the max.

@marc-gr marc-gr requested a review from andrewkroh June 4, 2021 08:00
@marc-gr marc-gr merged commit bb61f49 into elastic:main Jun 4, 2021
@marc-gr marc-gr deleted the glob branch June 4, 2021 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand globs from paths
3 participants