-
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
v4Consider in v4 of LandoConsider in v4 of Lando
Description
How can I access PHP error logs in Lando?
I've found several similar issues, but none of them allow you access to true error logs. At best they give you access to logs loosely related to PHP but are useless for resolving the cause of errors.
- Is it possible to separate webserver access and error logs with
lando logs? lando#315 - https://github.com/lando/lando/issues/2142
What I want is full access to error logs like you would be able to configure while hosting a site via localhost Apache and PHP.
Here's what I've attempted so far:
.lando.yml
(relevant pieces only)
config:
framework: drupal7
php: '7.1'
via: apache
database: mysql
webroot: docroot
drush: ^8
xdebug: false
config:
# Custom PHP config overrides.
php: lando/php-conf/php.ini
services:
appserver:
build_as_root:
- touch /var/log/php_errors.logNote that in the build process I am creating /var/log/php_errors.log.
lando/php-conf/php.ini
error_log = /var/log/php_errors.log
Then I followed these steps:
lando rebuildlando sshphp -i | grep error. Here I seeerror_log => /var/log/php_errors.log => /var/log/php_errors.log. This looks correct.ls /var/log/. Here I seephp_errors.log.tail -f /var/log/php_errors.log. I see nothing.- I trigger a PHP error. I still see nothing in the
tailprocess.
Am I missing something obvious? Wouldn't this be super useful for everyone? Thanks for any help.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
v4Consider in v4 of LandoConsider in v4 of Lando