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) { $level = strtoupper($level); if (defined(sprintf('Logger::%s', $level))) { $this->setLevel(constant(sprintf('Logger::%s', $level))); } } }