HomeDevCentral

Improve PHP logging on dev server

Description

Improve PHP logging on dev server

Summary:
In the current php-fpm configuration, two scenarii are possible:

  • by the default PHP configuration, the errors will be printed directly to the web page
  • if the application configures the logging, errors and fatal exceptions are lost if the application itself doesn't catch them.

This change will provide a log in /var/log/www instead.

If, in addition to the log, a display on web is welcome,
you can add to the pillar entry display_errors: on.

Reference: http://php.net/manual/en/install.fpm.configuration.php

Test Plan:
Tested on Ysul.

After a php-fpm service reload:
tail -f /var/log/www/nasqueron.org/api-php.log

Log correctly appears.

Reviewers: dereckson

Reviewed By: dereckson

Differential Revision: https://devcentral.nasqueron.org/D1252

Details

Provenance
derecksonAuthored on Feb 17 2018, 10:52
derecksonPushed on Feb 17 2018, 12:18
Reviewer
dereckson
Differential Revision
D1252: Improve PHP logging on dev server
Parents
rOPS098fd45fa370: Don't cache real time JSON log
Branches
Unknown
Tags
Unknown