mmoreram
mmoreram

Reputation: 684

Using Monolog and ReactPHP

I'm trying to build my Symfony application on top of ReactPHP engine, and everything goes fine, but the logs.

I have my application configured with a regular file log under devel environment, and a simple syslog log with level=error under production. In both environments I have "debug" enabled, otherwise even without ReactPHP and using a simple Apache, I cannot see any error in syslog.

The problem comes when I use ReactPHP. Initializing the symfony kernel using devel environment, everything is logged BUT the exception. It seems that I'm doing something wrong because Monolog is not handling the exception and any error is being logged.

Upvotes: 2

Views: 561

Answers (1)

kelunik
kelunik

Reputation: 6928

This is just a guess, but maybe your error gets usually logged via PHP's set_exception_handler(), while ReactPHP will catch uncaught exceptions inside its request handler to ensure the server stays up and running and doesn't die for every uncaught exception.

Upvotes: 0

Related Questions