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;
    }