src/DebugTrait.php
public function log($level, $message, array $context = [])
    {
        if (isset($this->app) && isset($this->app->logger) && $this->app->logger instanceof \Psr\Log\LoggerInterface) {
            $this->app->logger->log($level, $message, $context);
        } else {
            $this->_echo_stderr("$message\n");
        }

        return $this;
    }
public function log($level, $message, array $context = [])
    {
        if (isset($this->app) && isset($this->app->logger) && $this->app->logger instanceof \Psr\Log\LoggerInterface) {
            $this->app->logger->log($level, $message, $context);
        } else {
            $this->_echo_stderr("$message\n");
        }

        return $this;
    }
public function log ( $ level , $ message , array $ context = [ ] ) { if ( isset ( $ this -> app ) && isset ( $ this -> app -> logger ) && $ this -> app -> logger instanceof \ Psr \ Log \ LoggerInterface ) { $ this -> app -> logger -> log ( $ level , $ message , $ context ) ; } else { $ this -> _echo_stderr ( "$message\n" ) ; } return $ this ; }
Output log message.

@param string $level
@param string $message
@param array  $context

@return $this
Output log message .