Don't profile Bazel's internal log files even if `--record_full_profiler_data` is enabled.

PiperOrigin-RevId: 383598461
diff --git a/src/main/java/com/google/devtools/build/lib/unix/UnixFileSystem.java b/src/main/java/com/google/devtools/build/lib/unix/UnixFileSystem.java
index 3452f8b..f392d10 100644
--- a/src/main/java/com/google/devtools/build/lib/unix/UnixFileSystem.java
+++ b/src/main/java/com/google/devtools/build/lib/unix/UnixFileSystem.java
@@ -470,11 +470,17 @@
     return new FileInputStream(createJavaIoFile(path));
   }
 
-  @Override
   protected OutputStream createFileOutputStream(PathFragment path, boolean append)
       throws FileNotFoundException {
+    return createFileOutputStream(path, append, /* internal= */ false);
+  }
+
+  @Override
+  protected OutputStream createFileOutputStream(PathFragment path, boolean append, boolean internal)
+      throws FileNotFoundException {
     final String name = path.toString();
-    if (profiler.isActive()
+    if (!internal
+        && profiler.isActive()
         && (profiler.isProfiling(ProfilerTask.VFS_WRITE)
             || profiler.isProfiling(ProfilerTask.VFS_OPEN))) {
       long startTime = Profiler.nanoTimeMaybe();