-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Logs (access.log, error.log) to stdErr #358
Comments
I am not even getting this far... I am not able to get logs in the console at all. I can see that However, unless I add Is there something I am overlooking? |
Need to keep an eye on docker-library/php#358 to find out what is the reason that the `php_admin_flag[log_errors]` is necessary.
@gajus : try to replace logging to docker must be to files like /dev/stderr, /dev/stdout, /proc/self/fd/2, /proc/self/fd/1 in by capture by docker daemon |
Yeah, I'd love to have a decent fix for this, but we haven't found one yet -- I'm guessing that the reason |
created a bug report on php : https://bugs.php.net/bug.php?id=73886, wait and see |
for information : php/php-src#2310 |
Closing since this is a bug in upstream's handling of stdout, not something we can reasonably fix in the image. I'd love to see a PR which adds https://bugs.php.net/bug.php?id=73886 and php/php-src#2310 as context to our existing comment for future reference (and so we have an obvious place to go look for when this can be adjusted), though! ❤️ ala:
|
Hi I have been struggling with this bug to have access_log in stdout and I think I have found a good solution. I don't know if it is enough to go upstream. The idea is put access.log to /proc/self/fd/3 and redirect /proc/self/fd/3 to sdout. So, I have this in my php-fpm-conf
I already have a custom www.conf file for my php-fpm configuration, so it has not been a big deal to change the access.log. For the docker-php-entrypoint I have used sed in my dockerfile:
Maybe this is a bit tricky to go upstream, but it can help people to solve this problem by their own. |
This configuration seems normal to everyone :
But this really sucks, the access log is merged with the error log.
The fpm config doesn't allow us to catch true error (error output on catch error), the fpm log info & the access log.
I can see that the the comment is true, if you try anything else that is docker supported (/dev/stdout, ...) doesn't seems to work.
But I really wonder what is the reason since other docker image works well. I really want to report the bug to the right repositories.
I've the impression that is fpm related bug but I can't find any issue reported about this.
Any help will be really appreciate.
The text was updated successfully, but these errors were encountered: