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

java.util.logging.FileHandler uses hardcoded classname when reading properties

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Future Project
    • Icon: P4 P4
    • None
    • 1.4.2
    • core-libs



      Name: rmT116609 Date: 08/19/2004


      A DESCRIPTION OF THE REQUEST :
      When a FileHandler is created, it always looks for properties starting with
      java.util.logging.FileHandler...
      using the statement FileHandler.class.getName()

      JUSTIFICATION :
      When building subclasses of FileHandler, it would be nice to define separate
      properties for this subclass, e. g. another pattern, level, etc.
      The class FileHandler should use getClass().getName() to determine the prefix of properties.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Consider a simple subclass of FileHandler:
      com.foo.myapp.MyFileHandler

      Then it should automatically read the properties
      com.foo.myapp.MyFileHandler.pattern
      com.foo.myapp.MyFileHandler.level

      etc.
      ACTUAL -
      Consider a simple subclass of FileHandler:
      com.foo.myapp.MyFileHandler

      It always read the properties
      java.util.logging.FileHandler.pattern
      java.util.logging.FileHandler.level

      etc.

      CUSTOMER SUBMITTED WORKAROUND :
      Build an own subclass of FileHandler and read the properties manually.
      (Incident Review ID: 227942)
      ======================================================================

            Unassigned Unassigned
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: