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

TimeBasedRollingPolicy doesn't roll if the date change happens when the application is not currently running

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: logback-core
    • Labels:
      None
    • Environment:

      Windows, JSE6

      Description

      I discovered the same. I've been using log4j for years and it behaves
      differently than logback in this context, it will roll the log
      according to the configuration regardless of the execution context,
      which is imho a better behavior. I hope it would be possible to fix
      this issue or at least give an option between the two behaviors.

      Here is how I use it:

      • I have a monitoring task that is run every ten minutes and lasts
        for a dozen of seconds. I set logback to roll the logs everyday but
        it never happens because logback rolls ONLY if it is running while
        the date changes. I end up with a very huge log file that never rolls.
        Log4j will roll it during the first new execution after the date has
        changed.

      More info: http://www.qos.ch/pipermail/logback-user/2008-October/000626.html

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                logback-dev Logback dev list
                Reporter:
                gamov Gamaliel Amaudruz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: