Description
Symfony version(s) affected
6.1.*
Description
I start to develop a new project using symfony and swoole.
Symfony & Swoole is really fast, but when running in APP_ENV=dev environment, I cannnot see any log in profiler bar.
After some reseach, I found that the problem is \Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddDebugLogProcessorPass.
This classs will remove all debug logger when symfony is under CLI. So swoole or any other same framework like workerman/reactphp is not working well.
How to reproduce
- Install a new Symfony project
- composer install runtime/swoole
- Ensure the APP_ENV=dev
- Start your application from runtime/swoole
- Visit home page, or log something, open profiler bar and check.
Possible Solution
I dont know if we can detect the running environment while kernel compile.
Maybe we can add a new env variable, just like $_ENV['REMOTE_DEBUG_LOGGER'] (default: false) to replace the check in \Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddDebugLogProcessorPass::configureLogger.
Additional Context
No response