protected function normalizeMonologParameters($level = null, $message = null, $extra = [])
    {
        // Normalize the parameters so they're translated into sensible categories
        if (null !== $level) {
            if (is_array($level)) {
                $extra = $level;
                $level = null;
            } elseif (null === $message || is_array($message)) {
                $extra   = is_array($message) ? $message : $extra;
                $message = $level;
                $level   = null;
            }
        }

        if (is_array($message)) {
            $extra   = $message;
            $message = null;
        }

        if ( ! empty($extra) && ! is_array($extra)) {
            $extra = (array) $extra;
        }

        if ($message instanceof \Exception) {
            $level = 'error';
        }

        if ( ! $extra) {
            $extra = [];
        }

        return [
            $level   ?: 'info',
            $message ?: 'Data.',
            $extra
        ];
    }