Laravel\Lumen\Application::getMonologHandler PHP Method

getMonologHandler() protected method

Get the Monolog handler for the application.
protected getMonologHandler ( ) : AbstractHandler
return Monolog\Handler\AbstractHandler
    protected function getMonologHandler()
    {
        return (new StreamHandler(storage_path('logs/lumen.log'), Logger::DEBUG))->setFormatter(new LineFormatter(null, null, true, true));
    }

Usage Example

Example #1
0
 /**
  * Get the Monolog handler for the application.
  *
  * @return \Monolog\Handler\AbstractHandler
  */
 protected function getMonologHandler()
 {
     if (env('LOG_UDP_HOST')) {
         return new SyslogUdpHandler(env('LOG_UDP_HOST'), env('LOG_UDP_PORT'));
     }
     // @codeCoverageIgnoreStart
     return parent::getMonologHandler();
     // @codeCoverageIgnoreEnd
 }
All Usage Examples Of Laravel\Lumen\Application::getMonologHandler