• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to enable debug mode in logger(log4j)  RSS feed

 
samy mity
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to enable debug mode in logger(log4j).   Could see  info logs in log4j


Below is log4j config file
log4j.rootLogger=info, stdout, R

# Console appender (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 [%t] %p %c - %m%n

#File appender
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.home}\\logs\\MyTime.log
log4j.appender.R.MaxFileSize=500KB
# Keep three backup files.
log4j.appender.R.MaxBackupIndex=5
# Pattern to output: date priority [category] - message
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d [%t] %p %c - %m%n

# Hibernate
log4j.logger.org.hibernate=warn
log4j.logger.org.hibernate.SQL=warn
# Hibernate (JDBC bind parameters)
log4j.logger.org.hibernate.type=warn
# Hibernate Caching
log4j.logger.org.hibernate.cache=error

# Spring
log4j.logger.org.springframework=warn
log4j.logger.org.springframework.web.servlet=warn

# log levels for the java code in this project.
log4j.logger.com.thoms.myt=warn
 
Knute Snortum
Sheriff
Posts: 4279
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In this line:

change "info" to "debug".
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!