JBoss Community

Enable logging on Jboss 6.0

created by rosanero4ever in Beginner's Corner - View the full discussion

Hi all,

I use Jboss AS 6.0 and i would like enable logging for my little web application that uses ejb3 and hibernate 2.0 as persistence provider. I read many posts about enabling hibernate logging but actually i can't see any log :-( I create a log4j.properties file and I put it in the root folder of my Netbeans project. I put also log4j library in the classpath of the project. My log4j.properties s the following:

### direct log messages to stdout ###
log4j
.appender.stdout=org.apache.log4j.ConsoleAppender
log4j
.appender.stdout.Target=System.out
log4j
.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j
.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L %m%n


log4j
.rootLogger=debug, stdout

log4j
.logger.org.hibernate=info

### log just the SQL
log4j
.logger.org.hibernate.SQL=debug

### log JDBC bind parameters ###
log4j
.logger.org.hibernate.type=info

### log schema export/update ###
log4j
.logger.org.hibernate.tool.hbm2ddl=info

### log HQL parse trees
#log4j.logger.org.hibernate.hql=debug

### log cache activity ###
log4j
.logger.org.hibernate.cache=info

### log transaction activity
#log4j.logger.org.hibernate.transaction=debug

### log JDBC resource acquisition
#log4j.logger.org.hibernate.jdbc=debug

Why can't I see the log informations? I would like see values in sql WHERE clauses or in INSERT statements (actually I see only some '?') I read some articles about jboss-logging.xml but I don't know I should set it.

I hope somebody can help me. Thanks in advance

Reply to this message by going to Community

Start a new discussion in Beginner's Corner at Community