-
Notifications
You must be signed in to change notification settings - Fork 301
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
Prints server logs to "stderr" #326
Conversation
Can confirm this works well for Roadrunner, in both production and local environments. I'll test Swoole later today. |
@Radiergummi Please try to also test in some edge cases, to ensure this change won't effect with users. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have a very simple application to test this changes right now, so I cannot really go into feature test details or anything.
The solution does what the stderr
logger suggests - it logs server messages on stderr
. It does this for all server messages though, no matter if they come from stdout
or stderr
. It also does not respect the actual logger config of the application. I'm not sure if it should though (because I've no idea what stuff RR and swoole print besides the application logs).
An ideal solution, in my opinion, would only forward stderr
output of the worker processes to stderr
of the main process. When reading the RR documentation, I though this could be achieved with logs.err_output
setting, but it does not seem to do what the name suggests. So maybe this isn't even possible.
@Namoshek Your last comment was not clear for me. At this time, only server messages - outputted by the Laravel application - are captured and proxy to the |
@nunomaduro Exactly, everything from the The only thing which is still a bit weird to me: why are |
Agree.
That seems to be a roadrunner thing. We actually don't even touch on that configuration, so I would also expect those to be in the |
As far as I know from a Spiral project, the
I monkey-patched our main production workload with the PR changes, compared the output to our php-fpm variant, and did not notice any differences in log output. Printing huge messages ( Concerning the server channel: It would be preferable if Roadrunner had a log channel exclusive to the hosted application, or alternatively sent unrelated messages to another channel. Maybe they'd be open for such a change? |
Not sure - can you ask them? Meanwhile, making this PR open for review. |
Yep, I planned to open a Roadrunner issue on this. But if that is implemented at all, it's going to take a while, so it's out of scope for this PR anyway. |
@nunomaduro is there an ETA on the next release? I'm just now trying to debug an issue in production, but I don't have any stack traces in the application logs... |
@Radiergummi releases are done on Tuesday's. |
This pull request addresses #320, #325, by proxy applications logs (using
stderr
driver) tostderr
.