/** * 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); }); }
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; } }
public function terminate($request, $response) { LDT::response($response); LDT::send(); }