-
1. Re: How to log with Weld and AS 7.1
jamezp Mar 22, 2012 3:17 PM (in response to specialagent)Do you also have the dependency set in the dependency section of your POM? You might want to try that out just to see if the error goes away.
-
2. Re: How to log with Weld and AS 7.1
specialagent Mar 22, 2012 4:23 PM (in response to jamezp)Thank you for your answer, but I found JBoss Soldier (from Seam 3) and its offers everything I need.
Here are some tips:
1. Add dependency to pom for maven (see http://seamframework.org/Seam3/Solder)
2. Configure logging standalone.xml
2a. add your own logger category
{code:xml}
<logger category="de.mdames">
<level name="TRACE"/>
</logger>
{code}
2b. set console (or file-) handler level to TRACE
2c. keep root logger level at INFO, otherwise JBoss AS will log too much
3. Inject Logger
{code:java}
import org.jboss.solder.logging.Logger;
..
@Inject private Logger log;
{code}
4. Use logger instance
{code:java}
log.debugv("Trying to authenticate {0}", username);
{code}
5. Restart JBoss AS
Hope someone find this useful.