dev@glassfish.java.net

Re: logging messages in GlassFish

From: Byron Nevins <byron.nevins_at_oracle.com>
Date: Fri, 07 May 2010 12:08:03 -0700

Where are the exact instructions on how to setup and use this facility?


On 5/4/2010 5:44 PM, Carla Mott wrote:
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>

-- 
Byron Nevins  -  Oracle Corporation
Home: 650-359-1290
Cell: 650-784-4123
Sierra: 209-295-2188