How to log into the JBoss console

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?

0


source to share


2 answers


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.

+1


source


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

0


source







All Articles