public function log($type, $data, $severity = 'info', $translatable = true)
    {
        $message = '';

        if (is_string($data)) {
            $message = $data;
        } elseif (isset($data['message'])) {
            $message = (string) $data['message'];
        }

        $values = array(
            'text' => $message,
            'data' => (array) $data,
            'translatable' => $translatable,
            'type' => mb_substr($type, 0, 255),
            'severity' => mb_substr($severity, 0, 255)
        );

        return $this->add($values);
    }