-
Notifications
You must be signed in to change notification settings - Fork 19
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
Unable to determine stream size. Did you forget to close or flush the stream? #34
Comments
Writing data to S3 seems to have specific requirements. The logging implementation is very similar to what Monolog is doing and I believe Monolog doesn't support S3 out-of-the-box. I've found this article on StackOverflow, describing that you need to do some client initialization first. Maybe that helps. |
Yeah. Same way i did client initialization like this
Before build graveyard, i call this function to initialize client with stream wrapper of s3 storage. |
Did you write your own log handler or are you using the standard one that comes with the library? If you're using the battery standard one I'd suggest you try it with a custom one specifically for the S3 use case. |
I'm using
|
I did understand this, but I also don't have an idea where this is coming from. My guess is that something in the way the standard StreamHandler workes is incompatible with the S3 protocol. Therefore my suggestion, to implement a custom handler specifically for S3. |
Can i have any sample contract to write custom handler and it would be helpful for me. |
Have a look at these classes: https://github.com/scheb/tombstone/tree/1.x/src/logger/Handler |
Is it possible to add fflush to flush file output buffer in stream handler because since flush method declared but not implemented in stream handler. |
Sorry, I don't understand what you mean. I wouldn't want to touch the StreamHandler so much as this would potentially break other people's implementations. My recommendation is to implement a custom handler that fits your needs. |
I am getting
Unable to determine stream size. Did you forget to close or flush the stream?
when i am use S3 as storage with streamwrapper. Can you suggest me how to resolve this issue.The text was updated successfully, but these errors were encountered: