NetBeans recommended that I change the way we write record statements containing string concatenation, specifying Convert string concatenation to a message template so that the statement, for example:
log.severe("Completed at: " + new Date());
changed to
log.log(Level.SEVERE, "Completed at: {0}", new Date());
The problem is that now the date is not printed. Instead, the string "{0}" literatlly is printed instead. Is there anything else I could do?
source share