This commit is contained in:
		| @@ -6,7 +6,7 @@ use Symfony\Component\Yaml\Exception\ParseException; | ||||
|  | ||||
| use Monolog\Logger; | ||||
| use Monolog\Handler\StreamHandler; | ||||
|  | ||||
| use Psr\Log\NullLogger; | ||||
|  | ||||
| class App { | ||||
|     protected Logger $logger; | ||||
| @@ -15,10 +15,12 @@ class App { | ||||
|     function __construct(string $configFile) | ||||
|     { | ||||
|         $this->config = Yaml::parseFile($configFile); | ||||
|          | ||||
|         $logger = new Logger('app'); | ||||
|         $logger->pushHandler(new StreamHandler($this->getConfig()['logging']['stream'])); | ||||
|         if(isset($this->config['log'])) { | ||||
|             $logger->pushHandler(new StreamHandler($this->getConfig()['log'])); | ||||
|         } | ||||
|         $logger->info("Initialization complete"); | ||||
|          | ||||
|  | ||||
|         $this->logger = $logger; | ||||
|     } | ||||
|   | ||||
| @@ -27,8 +27,6 @@ class CommandBackup extends Command | ||||
|     { | ||||
|         $io = new SymfonyStyle($input, $output); | ||||
|         $io->title('Start backup process'); | ||||
|  | ||||
|         $io->info('Opening: '.$input->getArgument('config')); | ||||
|          | ||||
|         try { | ||||
|             $app = new App($input->getArgument('config')); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user