JBoss Community

Logging Id's

new comment by Brian Stansberry View all comments on this document

Best practice is to document the message ids used within the java classes. We've been using class javadoc like this in a lot of places:

/**
 * This module is using message IDs in the ranges 14600-14899 and 13400-13499.
 * 
 * This file is using the subsets 14630-14899 and 13450-13499 for non-logger messages.
 * 
 * See <a href="http://community.jboss.org/docs/DOC-16810">http://community.jboss.org/docs/DOC-16810</a> for the full
 * list of currently reserved JBAS message id blocks.
 * 
 */

 

I've found it's helpful to also leave a comment at the end of the file indicating the last valid number for the file so people are less likely to overflow when they add a message. This is particularly useful if the valid range for the file is small and ends on an unusual number.