It was supposed that errorlog is output to /var/log/nginx/error.log
But In fact it was not output.
my test code is below.
testController↓
public function get()
{
return $this->getDI()->get("not_exist_di_module")->hoge;
}
nginx.conf↓
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log error;
pid /run/nginx.pid;
...
and
$app->error(
function (Exception $exception) use ($app) {
$logger = new Logger\Adapter\Syslog(null);
$logger->error("#######");
});
It's not work↑.
$app->error(
function (Exception $exception) use ($app) {
$logger = new Stream("php://stderr");
$logger->error("This is another error");
});
It's not work↑.
$app->error(
function (Exception $exception) use ($app) {
$app->response->setStatusCode(500, "error of 500.")->send();
});
It's not work↑.
$app->error(
function (Exception $exception) use ($app) {
throw $exception;
});
It's not work↑.
// $app->error(
// function (Exception $exception) use ($app) {
// throw $exception;
// });
It's not work↑.
My environment is below.
Phalcon DevTools (3.4.0)
Environment:
OS: Linux fc4f20c672e4 4.9.60-linuxkit-aufs #1 SMP Mon Nov 6 16:00:12 UTC 2017 x86_64
PHP Version: 7.2.8
PHP SAPI: cli
PHP Bin: /usr/bin/php
PHP Extension Dir: /usr/lib64/php/modules
PHP Bin Dir: /usr/bin
Loaded PHP config: /etc/php.ini
Versions:
Phalcon DevTools Version: 3.4.0
Phalcon Version: 3.4.1
AdminLTE Version: 2.3.6
Please help me.