Sets the logging levels of the CIMC devices. The logging levels must match
    the following options: emergency, alert, critical, error, warning, notice,
    informational, debug.

    .. versionadded:: 2019.2.0

    Args:
        remote(str): The logging level for SYSLOG logs.

        local(str): The logging level for the local device.

    CLI Example:

    .. code-block:: bash

        salt '*' cimc.set_logging_levels remote=error local=notice

def set_logging_levels(remote=None, local=None):
    '''
    Sets the logging levels of the CIMC devices. The logging levels must match
    the following options: emergency, alert, critical, error, warning, notice,
    informational, debug.

    .. versionadded:: 2019.2.0

    Args:
        remote(str): The logging level for SYSLOG logs.

        local(str): The logging level for the local device.

    CLI Example:

    .. code-block:: bash

        salt '*' cimc.set_logging_levels remote=error local=notice

    '''

    logging_options = ['emergency',
                       'alert',
                       'critical',
                       'error',
                       'warning',
                       'notice',
                       'informational',
                       'debug']

    query = ""

    if remote:
        if remote in logging_options:
            query += ' remoteSeverity="{0}"'.format(remote)
        else:
            raise salt.exceptions.CommandExecutionError("Remote Severity option is not valid.")

    if local:
        if local in logging_options:
            query += ' localSeverity="{0}"'.format(local)
        else:
            raise salt.exceptions.CommandExecutionError("Local Severity option is not valid.")

    dn = "sys/svc-ext/syslog"
    inconfig = """<commSyslog dn="sys/svc-ext/syslog"{0} ></commSyslog>""".format(query)

    ret = __proxy__['cimc.set_config_modify'](dn, inconfig, False)

    return ret