public static void tryLog(@NotNull String eventName, @NotNull IndexedFile indexedFile, @Nullable Supplier<String> additionalMessage) {
    VirtualFile file = indexedFile.getFile();

    tryLog(eventName, file, () -> {
      String extra = "f@" + System.identityHashCode(indexedFile);

      if (indexedFile instanceof FileContentImpl fileContentImpl) {
        extra += ",tr=" + (fileContentImpl.isTransientContent() ? "t" : "f");
      }

      if (indexedFile instanceof FileContent fileContent) {
        extra += ",contLen(b)=" + fileContent.getContent().length;
        FileType fileType = fileContent.getFileType();
        extra += ",psiLen=" + (fileType instanceof LanguageFileType ? fileContent.getPsiFile().getTextLength() : -1);
        extra += ",bin=" + (fileType.isBinary() ? "t" : "f");
      }

      if (additionalMessage != null) {
        extra += "," + additionalMessage.get();
      }
      return extra;
    });
  }
public static void tryLog(@NotNull String eventName, @NotNull IndexedFile indexedFile, @Nullable Supplier<String> additionalMessage)