OK, I got the logging stuff to work (with the new annotations stuff, and with the mvn
processor plugin).
However, I can see this getting out of hand real quick if we aren't deliberate about
assigning number ranges not just across major components but more importantly within
components. Its easy to say "metrics, you have IDs between 1000-1999" but
getting each individual subcomponents within metrics to block off their own (or at least
making sure they don't step on each other) could be difficult to manage as the code
base grows larger.
So I have three things:
1) We need to block off larger ranges than just 1000. By default, the message IDs are
formatted to assume 6-characters in the ID. So that means we technically can go up to
999999 without having to do anything (we obviously can go with more, but we'd have to
specify the length in our @MessageLogger annotations if we want the IDs to "look
nice" when they are spit out in the log). But more importantly, it will be easier to
block of ranges of numbers within a major component (for example, I can already see a need
for me to block off numbers for my broker wildfly extension from the common bus API from
the nest wildfly extension).
2) Does anyone know of anyone on the Wildfly team or anyone else that has used this logger
annotation stuff for large projects? I'm curious to know what they do to make managing
the blocking off and assigning these numbers easier. Is there anything the Java compiler
can do to help? Anything tricks of laying out the message interfaces to make it easier?
3) I'm not assigning IDs and using these message interfaces/annotations for DEBUG or
TRACE messages. That will just get out of hand real quick. But that means in my code,
I'm actually created two loggers - one via Logger.getMessageLogger and one via
Logger.getLogger. The former will use the message interface and will be for INFO/ERROR
messages, the latter is for ad-hoc debug/trace messages.