You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "stefan-egli (via GitHub)" <gi...@apache.org> on 2023/03/09 18:11:41 UTC

[GitHub] [sling-org-apache-sling-event] stefan-egli commented on a diff in pull request #24: SLING-11793 : limit log messages count for JobExecutionContext

stefan-egli commented on code in PR #24:
URL: https://github.com/apache/sling-org-apache-sling-event/pull/24#discussion_r1131412288


##########
src/test/java/org/apache/sling/event/impl/jobs/config/JobManagerConfigurationTestFactory.java:
##########
@@ -52,7 +52,10 @@ public long startup_delay() {
             public int cleanup_period() {
                 return 0;
             }
-            
+
+            public int progresslog_maxCount() {
+                return 0;

Review Comment:
   IIUC this now changes the behaviour of log() for tests, as `0` indicates "discard logs". Was that the intention?



##########
src/main/java/org/apache/sling/event/impl/jobs/config/JobManagerConfiguration.java:
##########
@@ -92,6 +92,12 @@ public class JobManagerConfiguration {
             description = "Specify the periodic interval in minutes (default is 48h - use 0 to disable) after which " +
                     "removed jobs (ERROR or DROPPED) should be cleaned from the repository.")
         int cleanup_period() default 2880;
+
+        @AttributeDefinition(name = "Progress Log message's max count",
+                description = "Max number of log messages that can stored by consumer to add information about current state of Job.\n" +
+                        "Any attempt to add more information would result into purging of the least recent messages." +
+                        "default is -1 (to indicate infinite).")

Review Comment:
   IIUC then `0` now means "discard any log". If that's true, should this be added to this docu here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org