docs: def getLockFilename(self):
          """
          Decide the lock filename. If the logfile is file.log, then we use `.__file.lock` and
          not `file.log.lock`. This only removes the extension if it's `*.log`.
  
          :return: the path to the lock file.
          """
          if self.baseFilename.endswith(".log"):
              lock_file = self.baseFilename[:-4]
          else:
              lock_file = self.baseFilename
          lock_file += ".lock"
          lock_path, lock_name = os.path.split(lock_file)
          # hide the file on Unix and generally from file completion
          lock_name = ".__" + lock_name
          return os.path.join(lock_path, lock_name)