classes/Models/Worker.php
public function log($level, $message, $context = [])
    {
        // This will be empty when output messages are triggered by the command
        // when it's NOT called by a worker option
        if (empty($this->logger)) {
            return;
        }

        // Call the logger's level specific methods
        $method = 'add'.ucfirst($level);
        $this->logger->$method($message, $context);
    }
public function log($level, $message, $context = [])
    {
        // This will be empty when output messages are triggered by the command
        // when it's NOT called by a worker option
        if (empty($this->logger)) {
            return;
        }

        // Call the logger's level specific methods
        $method = 'add'.ucfirst($level);
        $this->logger->$method($message, $context);
    }
public function log ( $ level , $ message , $ context = [ ] ) { // This will be empty when output messages are triggered by the command // when it's NOT called by a worker option if ( empty ( $ this -> logger ) ) { return ; } // Call the logger's level specific methods $ method = 'add' . ucfirst ( $ level ) ; $ this -> logger -> $ method ( $ message , $ context ) ; }
Write Command output types to the log
@param $level
@param $message
@param array $context
Write Command output types to the log