def active_log_format(name, log_format, server=_DEFAULT_SERVER):
 ret = {'name': name, 'changes': {}, 'comment': str(), 'result': None}
 current_log_format = __salt__['win_smtp_server.get_log_format'](server)
 if (log_format == current_log_format):
  ret['comment'] = 'LogPluginClsid already contains the id of the provided log format.'
  ret['result'] = True
 elif __opts__['test']:
  ret['comment'] = 'LogPluginClsid will be changed.'
  ret['changes'] = {'old': current_log_format, 'new': log_format}
 else:
  ret['comment'] = 'Set LogPluginClsid to contain the id of the provided log format.'
  ret['changes'] = {'old': current_log_format, 'new': log_format}
  ret['result'] = __salt__['win_smtp_server.set_log_format'](log_format, server)
 return ret

def active_log_format ( name , log_format , server = _DEFAULT_SERVER ) : ret = { 'name' : name , 'changes' : { } , 'comment' : str ( ) , 'result' : None } current_log_format = __salt__ [ 'win_smtp_server.get_log_format' ] ( server ) if ( log_format == current_log_format ) : ret [ 'comment' ] = 'LogPluginClsid already contains the id of the provided log format.' ret [ 'result' ] = True elif __opts__ [ 'test' ] : ret [ 'comment' ] = 'LogPluginClsid will be changed.' ret [ 'changes' ] = { 'old' : current_log_format , 'new' : log_format } else : ret [ 'comment' ] = 'Set LogPluginClsid to contain the id of the provided log format.' ret [ 'changes' ] = { 'old' : current_log_format , 'new' : log_format } ret [ 'result' ] = __salt__ [ 'win_smtp_server.set_log_format' ] ( log_format , server ) return ret
manage the active log format for the smtp server .