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

[IDEA] Need a method to get the contents of the Ring and clear it. #88

Open
jvilhuber opened this issue Jun 14, 2023 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@jvilhuber
Copy link

Is your feature request related to a problem? Please describe.

In my use case, I want to capture the logs in a circular buffer (reasonably small?) so that if something bad happens, I can get the contents (last few minutes, but it depends on the size of the buffer) and send them to a log-server.

Describe the solution you'd like

The WriteTo method waits forever, and never really exits (unless the Writer is closed). Instead, I'd want some method that writes (and "erases"?) the contents to a Writer, and then exits.

Describe alternatives you've considered

I considered (and rejected) a timer after which time I close the Writer, but time is not well defined here.

Additional context

@jvilhuber jvilhuber added the enhancement New feature or request label Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant