def get_log_format_types():
 ret = dict()
 prefix = 'logging/'
 with salt.utils.winapi.Com():
  try:
   connection = wmi.WMI(namespace=_WMI_NAMESPACE)
   objs = connection.IISLogModuleSetting()
   for obj in objs:
    name = str(obj.Name).replace(prefix, '', 1)
    ret[name] = str(obj.LogModuleId)
  except wmi.x_wmi as error:
   _LOG.error('Encountered WMI error: %s', error.com_error)
  except (AttributeError, IndexError) as error:
   _LOG.error('Error getting IISLogModuleSetting: %s', error)
 if (not ret):
  _LOG.error('Unable to get log format types.')
 return ret

def get_log_format_types ( ) : ret = dict ( ) prefix = 'logging/' with salt . utils . winapi . Com ( ) : try : connection = wmi . WMI ( namespace = _WMI_NAMESPACE ) objs = connection . IISLogModuleSetting ( ) for obj in objs : name = str ( obj . Name ) . replace ( prefix , '' , 1 ) ret [ name ] = str ( obj . LogModuleId ) except wmi . x_wmi as error : _LOG . error ( 'Encountered WMI error: %s' , error . com_error ) except ( AttributeError , IndexError ) as error : _LOG . error ( 'Error getting IISLogModuleSetting: %s' , error ) if ( not ret ) : _LOG . error ( 'Unable to get log format types.' ) return ret
get all available log format names and ids .