Example #1
0
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     $monolog = Log::getMonolog();
     $monolog->pushHandler(new LDTHandler());
     DB::listen(function ($query) {
         \DPodsiadlo\LDT\Facades\LDT::query($query);
     });
 }
Example #2
0
 protected function write(array $record)
 {
     switch ($record['level']) {
         case Logger::DEBUG:
         case Logger::INFO:
             LDT::info($record['message']);
             break;
         case Logger::NOTICE:
         case Logger::WARNING:
             LDT::warning($record['message']);
             break;
         case Logger::ERROR:
         case Logger::CRITICAL:
         case Logger::ALERT:
         case Logger::EMERGENCY:
             LDT::error($record['message']);
             break;
     }
 }
Example #3
0
 public function terminate($request, $response)
 {
     LDT::response($response);
     LDT::send();
 }