Closed
Description
app/config/config_prod.yml
imports:
- { resource: config.yml }
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: "!event"
In /var/log/nginx/error.log I see:
2016/01/21 14:39:48 [error] 31596#0: *313 FastCGI sent in stderr: "PHP message: PHP Notice: Use of undefined constant MY_CONSTANT - assumed 'MY_CONSTANT' in /var/www/datravel-client-api/src/Datravel/ClientApiBundle/Controller/RestController.php on line 289
PHP message: PHP Stack trace:
PHP message: PHP 1. {main}() /var/www/datravel-client-api/web/app.php:0
PHP message: PHP 2. Symfony\Component\HttpKernel\Kernel->handle($request = *uninitialized*, $type = *uninitialized*, $catch = *uninitialized*) /var/www/datravel-client-api/web/app.php:27
PHP message: PHP 3. Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle($request = *uninitialized*, $type = *uninitialized*, $catch = *uninitialized*) /var/www/datravel-client-api/app/bootstrap.php.cache:2442
PHP message: PHP 4. Symfony\Component\HttpKernel\HttpKernel->handle($request = *uninitialized*, $type = *uninitialized*, $catch = *uninitialized*) /var/www/datravel-client-api/app/bootstrap.php.cache:3223
PHP message: PHP 5. Symfony\Component\HttpKernel\HttpKernel->handleRaw($request = *uninitialized*, $type = *uninitialized*) /var/www/datravel-client-api/app/bootstrap.php.cache:3072
PHP message: PHP 6. call_user_func_array:{/var/www/datravel-client-api/app/bootstrap.php.cache:3110}(*uninitialized*, *uninitialized*) /var/www/datravel-client-api/app/bootstrap.php.cache:3110
PHP message: PHP 7. Datravel\ClientApiBundle\Controller\RestController->getQuestions2Action() /var/www/datravel-client-api/app/bootstrap.php.cache:3110" while reading response header from upstream, client: 127.0.0.1, server: datravel-client-api.local, request: "GET /api/v1/client/questions2.json HTTP/1.1", upstream: "fastcgi://127.0.0.1:9400", host: "datravel-client-api.local"
But app/logs/prod.log is empty
$ ls -la app/logs/
total 8
drwxrwxrwx 2 lebnik lebnik 4096 дек. 18 14:02 .
drwxrwxr-x 6 lebnik lebnik 4096 янв. 21 12:59 ..
-rw-rw-r-- 1 lebnik lebnik 0 июля 31 17:20 .gitkeep
-rwxrwxrwx 1 lebnik lebnik 0 дек. 18 14:02 prod.log
Prod cache was cleared. I expecting logging notice about undefined constant.
public function getQuestions2Action()
{
MY_CONSTANT;
}
$ php5-fpm -v
PHP 5.6.11-1ubuntu3.1 (fpm-fcgi)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans
Metadata
Metadata
Assignees
Labels
No labels