-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
SlackHandler doesn’t work #729
Comments
+1 |
+1 |
+1 |
Unfortunatelly can confirm that if amount of logs is quite big, slack handler loses those messages. |
I don't really see what the fread does there.. Can someone try and explain? Do you add it at the very end or does it also work around SocketHandler line 294 just after the fwrite? Also could you maybe var_dump what the fread() returns to see what is being sent back by slack that we need to acknowledge for it to not drop messages? Another fix would be to add a fread() inside SlackHandler::write before closing the handler I guess. I don't really want to apply this blindly to all SocketHandler derivatives as it might cause issues. |
I think if socket closes too early, than slack will not process request. Result of
|
To confirm @r3nat, this works 👍
|
monolog 1.15.0, tried 1.17.1
30-70% of messages are lost without error.
Adding
fread($this->resource, 8192);
to the end ofSocketHandler->writeToSocket
fixes the problem, although it looks like dirty hack.The text was updated successfully, but these errors were encountered: