wodby / php

Generic PHP docker container images
MIT License
152 stars 103 forks source link

Add ability to override error_log via an environment variable #134

Closed mxr576 closed 3 years ago

mxr576 commented 3 years ago

Currently this seems the only option to use xDebug 3 the same way as I used xDebug 2 before.

More details are here: https://stackoverflow.com/questions/65616198/xdebug-start-start-with-request-yes-without-error-if-the-debug-client-is-not-lis

mxr576 commented 3 years ago

Or maybe the default error_log location could be something else in -dev images, like a file in /mnt/files/.

mxr576 commented 3 years ago

Related: https://xdebug.org/docs/all_settings#log_level

Criticals and errors are additionally logged through PHP's internal logging mechanism (configured with error_log in php.ini).

https://xdebug.org/docs/all_settings#log (again)

All errors are always logged through PHP's internal logging mechanism (configured with error_log in php.ini). All warnings and errors also show up in the diagnostics log that you can view by calling xdebug_info().

mxr576 commented 3 years ago

xdebug.log and xdebug.log_level cannot be configured with env vars either, allowing them to be changed via env vars could be a "valid workaround" for the new Xdebug 3 behavior with the given configuration. https://github.com/wodby/php/blob/4.18.6/7/templates/docker-php-ext-xdebug.ini.tmpl

csandanov commented 3 years ago

The env vars PHP_XDEBUG_LOG and PHP_XDEBUG_LOG_LEVEL have been added

mxr576 commented 3 years ago

Awesome! Thank you