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

slog-syslog: Streamer3164 doesn't empty buffer after writing #53

Closed
whipsch opened this issue Sep 29, 2016 · 0 comments
Closed

slog-syslog: Streamer3164 doesn't empty buffer after writing #53

whipsch opened this issue Sep 29, 2016 · 0 comments

Comments

@whipsch
Copy link
Contributor

whipsch commented Sep 29, 2016

The Drain::log implementation for Streamer3164 never trims TL_BUF after writing some bytes from it via syslog::Logger::send.

Note that syslog::Logger::send_raw returns the number of bytes written from the RFC3164 formatted message and not the raw message passed to it, so using the count returned by send is not suitable for trimming TL_BUF.

Streamer3164 should probably use format_3164 directly and continuously call send_raw until the message is fully written. Drain::log feels like std::io::Write::write_all to me, so I think this is semantically appropriate.

whipsch added a commit to whipsch/slog-rs that referenced this issue Sep 29, 2016
whipsch added a commit to whipsch/slog-rs that referenced this issue Sep 30, 2016
dpc added a commit that referenced this issue Sep 30, 2016
fix(syslog): #53: clear buffer after logging, behave like write_all
@whipsch whipsch closed this as completed Sep 30, 2016
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

No branches or pull requests

1 participant