Skip to content

Conversation

mikhainin
Copy link
Contributor

One more patch from our internal repository.

When an error happens, it may be useful to know what request was processed.

Examples from our logs:

WARNING: [pool default] child 3671124 said into stderr: "ERROR: Unable to open primary script: /local/deploy/shot-active/patch-104041/www/404.phtml (No such file or directory) URI: patch-104041.shot.devel/404.phtml"
WARNING: [pool default] child 2148804 said into stderr: "ERROR: status: unable to find or access status shared memory URI: www5/php-fpm-status"

@mikhainin mikhainin requested a review from bukka as a code owner August 11, 2023 12:34
@mikhainin mikhainin marked this pull request as draft August 11, 2023 13:05
@mikhainin mikhainin marked this pull request as ready for review August 11, 2023 14:20
@bukka
Copy link
Member

bukka commented Aug 26, 2023

This looks a bit hacky to me and not something that we should accept in the current form. I think much better solution would be to re-use the logic from access.format and allow formatting for log message (child logging through external logger). I have got some plans to look to consolidating access log and zlog in the future to allow longer access log messages so then it could be extended to allow formatting for error messages as well. This would be also more generic and would allow more things to be added.

@mikhainin
Copy link
Contributor Author

Thanks for your comment. I'll take a look into how we can make it better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants