Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7902384

Trace should should provide the ability to autoflush harness.trace

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: jt6.0
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b05

      Description

      com.sun.javatest.Trace reads the system property `javatest.trace.autoflush` but ignores the result.
      It would be nice if the setting could be honored and/or if the default was changed to autoflush:true

          private void openOutput(Parameters params) {
              try {
                  WorkDirectory wd = params.getWorkDirectory();
                  File traceFile = wd.getSystemFile("harness.trace");
                  boolean autoFlush = Boolean.getBoolean("javatest.trace.autoflush"); //<<<<<<<<*********
                  out = new TextWriter(backupPolicy.backupAndOpenWriter(traceFile));
                  // The following output is verified.
                  out.println("# Trace file started at " + (new Date()));
                  out.println("# " + ProductInfo.getName() + " version " + ProductInfo.getVersion());
                  out.println("# class directory: " + Harness.getClassDir());
                  out.println("# using java: " + System.getProperty("java.home"));
              }
              catch (IOException e) {
                  System.err.println("Cannot open trace file: trace cancelled");
                  System.err.println(e);
                  out = null;
              }
          }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dbessono Dmitry Bessonov
                Reporter:
                jjg Jonathan Gibbons
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: