Uploaded image for project: 'JBoss Logging'
  1. JBoss Logging
  2. JBLOGGING-52

Use of system property for proxy generation setting is too inflexible

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.0.Beta4-jboss-logging
    • Fix Version/s: None
    • Component/s: jboss-logging-spi
    • Labels:
      None
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Use static blocks to set the system property.

      Show
      Use static blocks to set the system property.

      Description

      JBoss Logging uses a system property to configure whether or not proxies are generated for type-safe loggers. This approach is very inflexible.

      The main issue is that the value of this system property is being cached too aggressively. In CDI extensions, we are forced to use a static code block to set the property so it is assigned early enough that JBoss Logging caches the correct value. However, with multiple extensions loading in a non-deterministic order, we end up having to put this static block in multiple places. [1]

      We need a better way to apply this setting. Perhaps a static method on a configuration API to assign the value before any logging takes place.

      [1] https://github.com/seam/solder/blob/master/impl/src/main/java/org/jboss/seam/solder/log/LoggerExtension.java
      https://github.com/seam/servlet/blob/master/impl/src/main/java/org/jboss/seam/servlet/ServletExtension.java

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jamezp James Perkins
                  Reporter:
                  dan.j.allen Dan Allen
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: