Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4462871

java.util.logging.SimpleFormatter uses hard-coded line separator

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.0
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      beta2
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description



      Name: krC82822 Date: 05/24/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      java.util.logging.SimpleFormatter always sur '\n' as line separator. There is
      an extract from its 'format(LogRecord)' method:

      (...)
      sb.append(record.getLevel().toString());
      sb.append(": ");
      sb.append(message);
      sb.append("\n");

      It should use 'System.getProperty("line.separator", "\n") instead. It would
      help specially since 'SimpleFormatter' is used with 'ConsoleHandler". It would
      also make it easier to read logs with Notepad on Windows NT.

      Note: System line-separator may be useful with XMLFormatter too.
      (Review ID: 125015)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              ghamiltosunw Graham Hamilton (Inactive)
              Reporter:
              kryansunw Kevin Ryan (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: