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

logback.xml not found when running under Ant task

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.9
    • Fix Version/s: 0.9.10
    • Component/s: logback-classic
    • Labels:
      None
    • Environment:

      Ant 1.7.1

      Description

      Logback uses the thread context ClassLoader to look up logback.xml but the Ant uses a custom ClassLoader that does not have the task JAR in its classpath, as a result logback.xml is never found.

      That is, getClass().getClassLoader().getResource("logback.xml") works
      Thread.currentThread().getContextClassLoader().getResource("logback.xml") does not.

        Attachments

          Activity

            People

            • Assignee:
              logback-dev Logback dev list
              Reporter:
              cowwoc Gili
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: