[wildfly-dev] how a -javaagent can use logging and not blow up WildFly

James Perkins jperkins at redhat.com
Mon Mar 6 12:00:43 EST 2017


On Sun, Mar 5, 2017 at 2:18 PM, John Mazzitelli <mazz at redhat.com> wrote:

> > > "oh, you just do this magical step and it works around the problem."
> >
> > With recent builds setting system property org.wildfly.logging.
> skipLogManagerCheck=true
> > should workaround your problem.
>
> Ah.. That's a good one to know.
>
> I need something for earlier WildFly and EAP builds, though. But I
> recently found this solves my problem (this worked for me on both EAP6 and
> EAP7.1):
>
> Inside standalone.conf:
>
> # Add "org.jboss.logmanager" to the JBoss Modules system packages
> if [ "x$JBOSS_MODULES_SYSTEM_PKGS" = "x" ]; then
>    JBOSS_MODULES_SYSTEM_PKGS="org.jboss.byteman,org.jboss.logmanager"
> fi
>
> #   Explicitly tell the VM to use the JBoss Log Manager via
> -Djava.util.logging.manager system property.
> #   Use the -javaagent VM option to load the agent
> JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.jboss.logmanager.LogManager
> -javaagent:my-agent.jar"
>

This is the correct solution. Skipping the check could potentially be an
issue if the log manager installed is not the jboss-logmanager. Adding
system module (or adding the library to the boot class path) and the
java.util.logging.manager as the first system property in the JAVA_OPTS is
the correct way to handle this.


>
> That seems to fix my problem.
> _______________________________________________
> wildfly-dev mailing list
> wildfly-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/wildfly-dev
>



-- 
James R. Perkins
JBoss by Red Hat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/wildfly-dev/attachments/20170306/9830ddf9/attachment.html 


More information about the wildfly-dev mailing list