Thruway\Logging\Logger::set PHP Method

set() public static method

public static set ( Psr\Log\LoggerInterface $logger )
$logger Psr\Log\LoggerInterface
    public static function set(LoggerInterface $logger)
    {
        static::$logger = $logger;
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     Logger::set(new NullLogger());
     $this->input = $input;
     $this->output = $output;
     $this->config = $this->getContainer()->getParameter('voryx_thruway');
     switch ($input->getArgument('action')) {
         case "start":
             $this->start();
             break;
         case "stop":
             $this->stop();
             break;
         case "restart":
             $this->restart();
             break;
         case "status":
             $this->status();
             break;
         case "add":
             $this->add();
             break;
         default:
             $output->writeln("Expected an action: start, stop, status");
     }
 }
All Usage Examples Of Thruway\Logging\Logger::set