1 Reply Latest reply: May 3, 2012 1:07 PM by James Perkins RSS

Need Logger class instance

Gajendra Rathore Newbie

I am switch my project from Jboss 4 to Jboss 7.


In Jboss 4 getting Logger class instance from below code but in Jboss 7 it is return back BridgeLogger instance, which is a final class.  How can I get Logger class instance ?


Throwable t = new Throwable();

StackTraceElement directCaller = t.getStackTrace()[1];

Object logger = Logger.getLogger(directCaller.getClassName(), factory);



Need help




  • 1. Re: Need Logger class instance
    James Perkins Master

    In JBoss AS 7 uses JBoss Logging and not log4j. In JBoss AS 7.2.x this should work as we replaced the log-bridge, but it has not been released yet. If you need to use log4j in your project with versions prior to 7.2 you need to exclude the servers log4j library and include your own.



    James R. Perkins