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

Use a WatchService for reconfiguration

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • logback-core

    Description

      Logback supports reconfiguration. For example it can check for changes in logback.xml every 30 seconds (as I read somewhere else this check happens on every 16th logging event):

      <configuration scan="true" scanPeriod="30 seconds">...</configuration>

      Java7 however supports monitoring file changes using a WatchService (http://docs.oracle.com/javase/7/docs/api/java/nio/file/WatchService.html). A WatchService would offer two big advantages:

      • instant configuration changes
      • no periodical checks for file changes

      I am aware that the minimum JDK version was recently raised to Java6, which is not Java7. But wouldn't it be possible to make use of that feature when avaialble?

      Attachments

        Activity

          People

            logback-dev Logback dev list
            steffenbr Steffen Brüntjen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: