If my application has no connection to the database (postgres), it ends with the default error page showing the infamous error in prod-mode:
Oops! An Error Occurred The server returned a "500 Internal Server Error".
In dev mode I see the error:
PDOException > Exception > ConnectionException An exception occurred in driver: SQLSTATE  could not connect to server: Connection refused
These causes are not displayed in the logs. Neither server nor php logs. The only thing I see there is
172.19.0.1 - - [30/Oct/2020:09:58:25 +0000] "GET / HTTP/1.1" 500 831
This is my monolog configuration:
monolog: handlers: main: type: fingers_crossed action_level: debug handler: nested nested: type: stream path: php://stdout level: debug
Btw, I’m logging everything to stdout.
So, how do I get these errors to the log?
(Symfony 5.1, docker, apache2)
Source: Symfony Questions