In Glassfish v2, you can easily set log levels using the admin console by going into Application Server > Logging > Log Levels. There you can add custom filter and change levels only by using the console.

In the new stable release of Glassfish, this option has disappeared, you can edit levels but there is no easy way to add custom filters. The trick is to alter manually the logging.properties file located in <yourdomain>/config directory. For example, if you want to filter out logs from Sun's Portlet Container, you have to set the following in the logging.properties file :

debug.com.sun.portlet.portletcontainer.impl.level=FINEST

Please notice the .level at the end of the fully qualified name of the class hierarchy to filter. After adding the new entry, you will be able to alter level via the admin console of Glassfish, or even simpler, simply edit the file : the changes are taken on the fly (in certain conditions, you might need to restart the server) !

Hope it'll help...

Swift macro : @VisibleForTesting

As an ancient Java developer, I’ve learned to use a set of annotations to bring meta programming in my projects. Meta programming can be ...… Continue reading

Dark Mode iOS Snapshot

Published on January 10, 2021

Git-gone

Published on December 31, 2020