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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • core-libs
    • beta2
    • generic
    • generic
    • Verified



      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)
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: