I have implemented a basic logger like in https://akrabat.com/logging-errors-in-slim-3/. When I var_dump($container[‘errorHandler’]), I get the following code. When I throw a new Exception(), I get no output in log file. Help!
App\Handlers\Error Object
(
[logger:protected] => Monolog\Logger Object
(
[name:protected] => logger
[handlers:protected] => Array
(
[0] => Monolog\Handler\FingersCrossedHandler Object
(
[handler:protected] => Monolog\Handler\StreamHandler Object
(
[stream:protected] =>
[url:protected] => /var/www/html/slim-api/public/app.log
[errorMessage:Monolog\Handler\StreamHandler:private] =>
[filePermission:protected] =>
[useLocking:protected] =>
[dirCreated:Monolog\Handler\StreamHandler:private] =>
[level:protected] => 100
[bubble:protected] => 1
[formatter:protected] =>
[processors:protected] => Array
(
)
)
[activationStrategy:protected] => Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy Object
(
[actionLevel:Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy:private] => 400
)
[buffering:protected] => 1
[bufferSize:protected] => 0
[buffer:protected] => Array
(
)
[stopBuffering:protected] => 1
[passthruLevel:protected] =>
[level:protected] => 100
[bubble:protected] => 1
[formatter:protected] =>
[processors:protected] => Array
(
)
)
)
[processors:protected] => Array
(
)
[microsecondTimestamps:protected] => 1
[exceptionHandler:protected] =>
)
[displayErrorDetails:protected] =>
[knownContentTypes:protected] => Array
(
[0] => application/json
[1] => application/xml
[2] => text/xml
[3] => text/html
)
)