-
1. Re: Jboss AS 7.1.1 Custom logger - how to get line number and fileName
raydecampo Jul 10, 2012 12:19 PM (in response to ftom2)Am I missing something, I thought JBoss 7 used log4j for the logging system? At least it is provided as a module and the configuration is very log4j-ish.
-
2. Re: Jboss AS 7.1.1 Custom logger - how to get line number and fileName
jbertram Jul 10, 2012 12:39 PM (in response to raydecampo)Am I missing something, I thought JBoss 7 used log4j for the logging system? At least it is provided as a module and the configuration is very log4j-ish.
I'm no expert in logging for AS7, but I can tell you definitively that AS7 doesn't use Log4J as its logging subsystem. It uses JBoss Logging 3.
That said, applications can still use Log4J (or just about any other commoon logging framework) if they wish by leveraging the right modules.
-
3. Re: Jboss AS 7.1.1 Custom logger - how to get line number and fileName
jamezp Jul 10, 2012 1:18 PM (in response to ftom2)That information is not provided by J.U.L. If you don't mind having a dependency on jboss-logmanger you could extend org.jboss.logmanager.ExtHandler instead of the J.U.L. handler. That will provide you with the a org.jboss.logmanager.ExtLogRecord that will provide that information.
You would just override the doPublish(ExtLogRecord) instead of the J.U.L. publish method.
JBoss AS 7 uses JBoss Logging and JBoss Log Manager so that dependency would already be provided for you.
--
James R. Perkins
-
4. Re: Jboss AS 7.1.1 Custom logger - how to get line number and fileName
srmudiganti Jun 17, 2015 10:07 AM (in response to ftom2)Hi,
I know this post is old but I want to write log to database, so can you please share the steps that you followed to log to database ?
Thanks