Hi all,
We are getting started with the 3.1 code and I wanted to send out a note
about logging messages in GlassFish. This should be review and I wanted
to make sure we all use the GlassFish logging mechanism as it was intended.
Thanks,
Carla
Review of the requirements:
As of the 3.0 release ALL messages of level SEVERE, WARNING and INFO
must have a message id. That is all messages in the
LogStrings.properties file must have a message id. Please see the
following wiki page for information on message ids.
http://wiki.glassfish.java.net/Wiki.jsp?page=GlassFishV3LoggingMessageFormat
Log messages level SEVERE, WARNING and INFO should be in
LogStrings.properties file
All SEVERE and WARNING messages must have dignostic info too
Below is an example I got from the EJB module. It shows the code and
the entries in the the LogStrings.properties file.
Example code:
_logger.log(Level.SEVERE, "jacc_policy_context_exception", cause);
Example LogString.properties file entry:
jacc_policy_context_exception=EJB5183:JACC: Unexpected exception
manipulating policy context
EJB5183.diag.cause.1=An Exception was thrown while resetting the
policycontext
EJB5183.diag.check.1=Check the EJB policy to see if the policy contexts
of the application are correct