static function startUp(KernelInterface $kernel, ModuleInfo $moduleInfo)
 {
     // This module runs before all other modules, so that it becomes enabled as soon as possible.
     $kernel->onPreRegister(function (InjectorInterface $injector) {
         $injector->share(LoggerInterface::class)->delegate(LoggerInterface::class, function (KernelSettings $kernelSettings) {
             $logger = new Logger('main');
             if ($kernelSettings->isConsoleBased) {
                 $logger->pushHandler(new StreamHandler('php://stderr', env('DEBUG_LEVEL') ?: Logger::DEBUG));
             }
             return $logger;
         });
     });
 }