code: def log_path(self, new_path):
          
          if self.has_active_service:
              raise DeviceError(
                  self,
                  'Cannot change `log_path` when there is service running.')
          old_path = self._log_path
          if new_path == old_path:
              return
          if os.listdir(new_path):
              raise DeviceError(
                  self, 'Logs already exist at %s, cannot override.' % new_path)
          if os.path.exists(old_path):
              # Remove new path so copytree doesn't complain.
              shutil.rmtree(new_path, ignore_errors=True)
              shutil.copytree(old_path, new_path)
              shutil.rmtree(old_path, ignore_errors=True)
          self._log_path = new_path
docs: Setter for `log_path`, use with caution.