code: def _sysfs_attr(name, value=None, log_lvl=None, log_msg=None):
      '''
      Simple wrapper with logging around sysfs.attr
      '''
      if isinstance(name, six.string_types):
          name = [name]
      res = __salt__['sysfs.attr'](os.path.join(*name), value)
      if not res and log_lvl is not None and log_msg is not None:
          log.log(LOG[log_lvl], log_msg)
      return ref _sysfs_attr(name, value=None, log_lvl=None, log_msg=None):
      '''
      Simple wrapper with logging around sysfs.attr
      '''
      if isinstance(name, six.string_types):
          name = [name]
      res = __salt__['sysfs.attr'](os.path.join(*name), value)
      if not res and log_lvl is not None and log_msg is not None:
          log.log(LOG[log_lvl], log_msg)
      return res
docs: Simple wrapper with logging around sysfs.attr