public function log($level, $rawMessage, array $context = array())
    {
        $message = $this->initMessage($level, $rawMessage, $context);

        // add exception data if present
        if (isset($context['exception'])
           && $context['exception'] instanceof Exception
        ) {
            $this->initExceptionData($message, $context['exception']);
        }

        $this->publisher->publish($message);
    }