Given the simple snippet:
Ivy.log().warn("The current case with id #{0} is awesome!", ivyCase.getId());
does produce an output like:
The current case with id #1.337 is awesome!
I am a bit in awe why that's the case, after going through the source code, I found out that the logger in the end is just calling MessageFormat.format(formatedMessage,args)
(API)
Since the caseId is a primitive long, the following subformat is applied: NumberFormat.getIntegerInstance(getLocale())
.
By default, this will always lead to the string having thousands separators for every locale possible.
This cannot be easily bypassed with the current API in Axon Ivy, only circumvented by passing the caseId as String like:
Ivy.log().warn("The current case with id #{0} is awesome!", ""+ivyCase.getId());
However, since the default behaviour requires the person searching for a case or task id to add these thousands separators by hand, I think it's a doing more harm than good. It also adds a certain inconsistency to the display of the ids since they are displayed without the separators throughout the Portal.
I also must admit that in the past, I forgot about this constraint and was like "oh no, why is there no log entry?" - but in the end, I was just searching for the wrong String in a 50 MB logfile.
Since I think that I am not the only one stumbling upon this thing, I'd kindly ask to think about a refactoring of the
AdvancedMessage
class to not rely on the JVM's default formatting but rather to enforce the non-formatted output of numbers.