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
Docker logging plugins and error handling #40623
Comments
I'm not sure what you mean here.
If you've closed it, then it's up to you to re-open.
Docker's log handling is line based. Lines are truncated if they are larger than 1MB. |
Thanks for the detailed answer!
If for example there is a bug in the protobuf library (I'm working in rust so it's still a young ecosystem) that makes it read one byte more then requested, I might end up reading part of the length of the followup [size]. |
If you read too much from the stream you'll need to manage what chunk of data you are actually wanting to de-serialize and keep the rest of the data in a buffer that you can pull out for the next read. |
Description
Looking at the provided example plugin, there is little error handling, and the webpage doesn't contain much useful information in this regard.
I was wondering what would be the suggested error handling flow:
truncated
field, then what's the maximum size docker is going to send per log entry?Basically I fear some sort of desynchronization with the logging stream, that might lead to a
[size]
of 4GBs. So I would like to use the max size for the log entry as a guard. My issue though is obviously that if I wish to not stop logging, so I'm wondering if there is a way to magically synchronize again after losing the sync.Thanks!
The text was updated successfully, but these errors were encountered: