Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-3059

Log4J fails to open configuration file that is on WSL path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.14.1
    • None
    • Core
    • None
    • Windows 10
      Java program running on Windows but with log4j configuration on classpath on WSL

    Description

      When Log4J searches for configuration and config file is located on WSL FileUtils.fileFromUri fails to create a File instance.

      The reason is that when the URI is in this form file://wsl$/some/path/to/log4j.config
      new File(uri) throws exception that this uri has authority and as result the utility method returns null.

      If in this case new File(uri.toString()) is used it works perfectly fine

      Attachments

        Activity

          People

            Unassigned Unassigned
            Bondzhev Doychin Bondzhev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: