Community
Participate
Working Groups
Created attachment 243211 [details] Example implementation replacing JavaLog. Might be used to work-around this bug. For demonstration purposes only. org.eclipse.persistence.logging.JavaLog (activated by means of eclipselink.logging.logger=JavaLogger or defaulted by GlassFish) constructs the namespace for session loggers in a way that makes it virtually impossible to configure logging levels using standard JUL (i.e. logging.properties) or GlassFish approach. The namespace it constructs for a session logger looks like this: org.eclipse.persistence.session.[session name].[category] Assuming sql statements are to be logged by setting the level for the sql category to FINE org.eclipse.persistence.session.sql=FINE JavaLog creates a logger namespace similar to org.eclipse.persistence.session.file:/var/folders/h9/h10t95696fg82tsqndvg6tdr0000gn/T/gfembed3355794571259202884tmp/applications/6bc88d72-aa1e-497e-94a7-dd0b0ce1b835/WEB-INF/classes/_sef.sql No chance at all for this namespace to inherit its level from org.eclipse.persistence.session.sql :-( IMHO, JavaLogger's usability would very much benefit, if namespaces would have sessions names appended last: org.eclipse.persistence.session.[category].[session name] This would enable session loggers to inherit their levels from GlassFish / JUL settings. I've attached a precarious implementation which implements this pattern (for demonstration purposes only, it requires Java 7 and uses Guava).
Created attachment 243748 [details] Amended example implementation replacing JavaLog now supports instant Logging Level Changes vie GlassFish GUI There are several code spots saving, changing and eventually restoring SessionLog levels (most probably in order to temporarily disable any logging). As there is no way to reset a level to "inherit from parent", setting a SessionLog level permanently disables any inheritance from the Java Util Logging levels (e.g. as set using GlassFish GUI). This new example implementation tries to work-around by interpreting any log level < SEVERE as "remove any level", thus reinstating inheritance from Java Util Logging levels. Though somewhat quick-and-dirty, EL logging levels set using GlassFish GUI now take effect immediately.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink