Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-306

Can't set RequestLogImpl to use a logback-access.xml file via a classpath path

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.28
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      (Affects 0.9.30, the latest version at the moment)

      ch.qos.logback.access.jetty.v7.RequestLogImpl has setFileName, the result of which is then handed to File's constructor. This is fine when you're deploying inside a standalone jetty that has the jetty.home property set to a filesystem path, but when you're using embedded jetty, you don't have any of that. Instead I'd like to be able to have it find "/logback-access.xml" in the classpath just the way logback classic does with "/logback.xml".

      I'm happy to implement the patch; just let me know how you'd like it to be done. One way would be to provide a setter on RLImpl that takes a URL which, if specified, takes precedence over the filename.

      As a workaround I'm creating a JoranConfigurator and using its doConfigure(URL) method on a URL loaded from the classpath. This works, but it'd be nice to not have to do that.

        Attachments

          Activity

            People

            • Assignee:
              ceki Ceki Gülcü
              Reporter:
              mpierce Marshall Pierce
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: