I am experimenting with Netbeans and JBoss and I would like to print to the JBoss console from my code. Can I use log4j for this?
Yes. Modify $ JBOSS_HOME / server / [config] /conf/jboss-log4j.xml to add a category if you want to display below INFO (default level).
[config] -> one default, minimal, web, etc.
import org.jboss.logging.Logger;
Logger.getLogger(this.getClass()).info("put your message here");
In jboss7 and StandAlone mode your logs will be here: \jboss-as-7.1.1.Final\standalone\log
\jboss-as-7.1.1.Final\standalone\log