Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-2209

LogBack configuration

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1 (Sinan)
    • Fix Version/s: 3.1.1
    • Component/s: None
    • Labels:
      None

      Description

      Logback configuration does not allow to specify "cleanHistoryOnStart" property. From their web:

      cleanHistoryOnStart boolean

      If set to true, archive removal will be executed on appender start up. By default this property is set to false.

      Archive removal is normally performed during roll over. However, some applications may not live long enough for roll over to be triggered. It follows that for such short-lived applications archive removal may never get a chance to execute. By setting cleanHistoryOnStart to true, archive removal is performed at appender start up.

      There is no way of doing this in system configuration (and there is no support in schema). Manual modification of ./infra/common/src/main/java/com/evolveum/midpoint/common/LoggingConfigurationManager.java didn't work:

      diff --git a/infra/common/src/main/java/com/evolveum/midpoint/common/LoggingConfigurationManager.java b/infra/common/src/main/java/com/evolveum/midpoint/common/LoggingConfigurationManager.java
      index 56d3e3a..78339b8 100644
      --- a/infra/common/src/main/java/com/evolveum/midpoint/common/LoggingConfigurationManager.java
      +++ b/infra/common/src/main/java/com/evolveum/midpoint/common/LoggingConfigurationManager.java
      @@ -235,6 +235,7 @@ public class LoggingConfigurationManager {
                                                      sb.append("\t\t\t<maxHistory>");
                                                      sb.append(a.getMaxHistory());
                                                      sb.append("</maxHistory>\n");
      +sb.append("\t\t\t<cleanHistoryOnStart>true</cleanHistoryOnStart>");^M
                                              }
              
                                              // file triggering
      

        Attachments

          Activity

            People

            Assignee:
            vix Ivan Noris
            Reporter:
            vix Ivan Noris
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: