Log4j 2
  1. Log4j 2
  2. LOG4J2-293

classloader URI scheme broken or insufficient when using Log4jContextListener

    Details

      Description

      I'm trying to migrate to Log4j2, and things looked promising when I spotted Log4jContextListener.

      However, there are too many holes.

      Firstly, I tried using classpath: as a scheme, and nothing blew up, so I assumed I'd got it right.

      Then I looked at the code (which shouldn't be how we find out) and eventually discovered some code relating to a 'classloader' scheme.

      Still silent failure. It seems that the classpath is not being searched, perhaps just the WAR classloader, not the JARs in WEB-INF/lib.

      Next I tried omitting the / (i.e. using classloader:log4j2.xml) and got a NullPointerException.

      Can you please document what schemes are supported and what you expect them to do, and not fail silently when a configuration file is specified, but nothing happens.

      1. LOG4J2-293.patch
        3 kB
        Abhinav Shah
      2. TestConfigurator.java
        15 kB
        Abhinav Shah
      3. ConfigurationFactory.java
        19 kB
        Abhinav Shah

        Issue Links

          Activity

          Nick Williams made changes -
          Link This issue relates to LOG4J2-394 [ LOG4J2-394 ]
          Ralph Goers made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Nick Williams made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Nick Williams made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Fix Version/s 2.0-beta9 [ 12324756 ]
          Resolution Fixed [ 1 ]
          Abhinav Shah made changes -
          Attachment LOG4J2-293.patch [ 12600904 ]
          Abhinav Shah made changes -
          Attachment LOG4J2-293.patch [ 12600891 ]
          Abhinav Shah made changes -
          Attachment LOG4J2-293.patch [ 12600891 ]
          Nick Williams made changes -
          Link This issue is related to LOG4J2-359 [ LOG4J2-359 ]
          Nick Williams made changes -
          Link This issue is duplicated by LOG4J2-359 [ LOG4J2-359 ]
          Nick Williams made changes -
          Link This issue is duplicated by LOG4J2-357 [ LOG4J2-357 ]
          Nick Williams made changes -
          Link This issue is duplicated by LOG4J2-359 [ LOG4J2-359 ]
          Abhinav Shah made changes -
          Attachment ConfigurationFactory.java [ 12600875 ]
          Attachment TestConfigurator.java [ 12600876 ]
          Abhinav Shah made changes -
          Link This issue is related to LOG4J2-357 [ LOG4J2-357 ]
          Nick Williams made changes -
          Link This issue is related to LOG4J2-270 [ LOG4J2-270 ]
          Nick Williams made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Nick Williams made changes -
          Assignee Nick Williams [ beamerblvd ]
          Neale Upstone made changes -
          Affects Version/s 2.0-beta7 [ 12324400 ]
          Neale Upstone made changes -
          Field Original Value New Value
          Component/s Configurators [ 12312241 ]
          Neale Upstone created issue -

            People

            • Assignee:
              Nick Williams
              Reporter:
              Neale Upstone
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development