command = $command; $this->changeLevel(env('LOG_LEVEL', 'debug')); } /** * Writes the record down to the log of the implementing handler * * @param array $record * * @return void */ protected function write(array $record) { $this->command->line((string)trim($record['formatted'])); } /** * @param string $level */ private function changeLevel(string $level) { switch ($level) { case 'debug': $this->setLevel(Logger::DEBUG); break; case 'info': $this->setLevel(Logger::INFO); break; case 'notice': $this->setLevel(Logger::NOTICE); break; case 'warning': $this->setLevel(Logger::WARNING); break; case 'error': $this->setLevel(Logger::ERROR); break; case 'critical': $this->setLevel(Logger::CRITICAL); break; case 'alert': $this->setLevel(Logger::ALERT); break; case 'emergency': $this->setLevel(Logger::EMERGENCY); break; } } }