[ 
https://issues.apache.org/jira/browse/ARTEMIS-5110?focusedWorklogId=939323&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-939323
 ]

ASF GitHub Bot logged work on ARTEMIS-5110:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Oct/24 21:57
            Start Date: 21/Oct/24 21:57
    Worklog Time Spent: 10m 
      Work Description: jbertram commented on code in PR #5303:
URL: https://github.com/apache/activemq-artemis/pull/5303#discussion_r1809587805


##########
artemis-log-annotation-processor/src/main/java/org/apache/activemq/artemis/logs/annotation/processor/LogAnnotationProcessor.java:
##########
@@ -204,6 +208,17 @@ void validateRegexID(LogBundle bundleAnnotation, long id) {
       }
    }
 
+   void checkRetiredIDs(LogBundle bundleAnnotation, long id) {
+      if (bundleAnnotation.retiredIDs() != null && 
!bundleAnnotation.retiredIDs().isEmpty()) {
+         if (Arrays.stream(bundleAnnotation.retiredIDs().split(","))
+                   .map(String::trim)
+                   .map(Long::valueOf)
+                   .collect(Collectors.toList()).contains(id)) {
+            throw new IllegalArgumentException("Code ID " + id + " has been 
retired. Select a different ID.");
+         }
+      }
+   }

Review Comment:
   Updated. Let me know what you think.





Issue Time Tracking
-------------------

    Worklog Id:     (was: 939323)
    Time Spent: 1h 10m  (was: 1h)

> Add ability to identify retired IDs in log annotations
> ------------------------------------------------------
>
>                 Key: ARTEMIS-5110
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5110
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> The broker uses unique IDs for logging statements. As logging changes over 
> time we need a way to "retire" these IDs (e.g. when certain logging 
> statements are no longer needed) to ensure they are not used again in the 
> future (or perhaps put back into the rotation after a certain amount of time).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to