# To turn more verbose logging on - change "ERROR" to "WARN" or "DEBUG"

log4j.rootLogger=INFO, confluencelog, errorlog, testAppender

###
# Here we define the default appender
#
# For development, the ConsoleAppender is used, leaving the logging configuration up to the app server/IDEA.
#
# When Confluence EAR/WAR or Standalone is being built (with Tomcat 5.5 - see the maven.xml file), we replace
# the ConsoleAppender with a ConfluenceHomeLogAppender and log to the Confluence home directory.
###
log4j.appender.confluencelog=org.apache.log4j.ConsoleAppender
log4j.appender.confluencelog.Threshold=DEBUG
#log4j.appender.confluencelog.File=${catalina.home}/logs/atlassian-confluence.log
#log4j.appender.confluencelog.MaxFileSize=20480KB
#log4j.appender.confluencelog.MaxBackupIndex=5
log4j.appender.confluencelog.layout=com.atlassian.confluence.util.PatternLayoutWithContext
log4j.appender.confluencelog.layout.ConversionPattern=%d %p [%t] [%c{4}] %M %m%n

log4j.appender.testAppender=com.atlassian.confluence.admin.actions.TestAppender
log4j.appender.testAppender.Threshold=DEBUG
log4j.appender.testAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.testAppender.layout.ConversionPattern=%m


log4j.logger.com.atlassian.confluence.core=DEBUG, confluencelog
log4j.additivity.com.atlassian.confluence.core=false

log4j.logger.com.atlassian.confluence.search=DEBUG, confluencelog
log4j.additivity.com.atlassian.confluence.search=false

###
# Atlassian User
###
log4j.logger.com.atlassian.user=DEBUG, confluencelog
log4j.additivity.com.atlassian.user=false
log4j.logger.com.atlassian.confluence.user=DEBUG,confluencelog
log4j.additivity.com.atlassian.confluence.user=false
log4j.logger.bucket.user=DEBUG,confluencelog
log4j.additivity.bucket.user=false
log4j.logger.com.atlassian.seraph=DEBUG, confluencelog
log4j.additivity.com.atlassian.seraph=false
log4j.logger.com.opensymphony.user=DEBUG, confluencelog
log4j.additivity.com.opensymphony.user=false

###
# Attachment Migration
###
log4j.logger.com.atlassian.confluence.pages.persistence.dao=DEBUG, confluencelog

###
# INFO logging for startup event
###
log4j.logger.com.atlassian.confluence.lifecycle=INFO, confluencelog
log4j.additivity.com.atlassian.confluence.lifecycle=false

###
# INFO logging for upgrade tasks.
###
log4j.logger.com.atlassian.confluence.upgrade=INFO, confluencelog
log4j.logger.com.atlassian.upgrade=INFO, confluencelog
log4j.additivity.com.atlassian.confluence.upgrade=false
log4j.additivity.com.atlassian.upgrade=false

# Cluster events
log4j.logger.com.atlassian.confluence.cluster=INFO, confluencelog
log4j.additivity.com.atlassian.confluence.cluster=false

# Cluster safety logging
log4j.logger.com.atlassian.confluence.cluster.safety=INFO, confluencelog
log4j.additivity.com.atlassian.confluence.cluster.safety=false

#log4j.logger.com.mchange.v2.resourcepool.BasicResourcePool=DEBUG, confluencelog
#log4j.additivity.com.mchange.v2.resourcepool.BasicResourcePool=false

###
# THREAD LOCAL ERROR LOG APPENDER
###
log4j.appender.errorlog=com.atlassian.core.logging.ThreadLocalErrorLogAppender
log4j.appender.errorlog.Threshold=WARN

#log4j.logger.velocity=DEBUG, confluencelog
#log4j.additivity.velocity=false

## mail jobs debugging
#log4j.logger.com.atlassian.confluence.mail.jobs=DEBUG,console

## lucene debugging
#log4j.logger.com.atlassian.confluence.search.lucene=DEBUG, confluencelog
#log4j.additivity.com.atlassian.confluence.search.lucene=false
#log4j.logger.com.atlassian.bonnie=DEBUG, confluencelog
#log4j.additivity.com.atlassian.bonnie=false

# suppress WARN log statements from the ReadWriteCache class (CONF-2517)
log4j.logger.net.sf.hibernate.cache.ReadWriteCache=ERROR, confluencelog

# View SpacePermission cache hits and misses
#log4j.logger.com.atlassian.confluence.security=DEBUG, confluencelog

# Tangosol Coherence logging -- see also severity in tangosol-coherence-override.xml.
#log4j.logger.Coherence=DEBUG, confluencelog
#log4j.additivity.Coherence=false

#####################
# Hibernate logging #
#####################

## log hibernate prepared statements/SQL queries (equivalent to setting 'hibernate.show_sql' to 'true')
log4j.logger.net.sf.hibernate.SQL=DEBUG, confluencelog
log4j.additivity.net.sf.hibernate.SQL=false

## log hibernate prepared statement parameter values
log4j.logger.net.sf.hibernate.type=DEBUG, confluencelog
log4j.additivity.net.sf.hibernate.type=false

# suppress JDBCExceptionReporter warnings (there can be a few of these under DB2)
log4j.logger.net.sf.hibernate.util.JDBCExceptionReporter=ERROR, confluencelog

# suppress warnings from the SessionImpl (like Narrowing proxy to class com.atlassian.confluence.pages.Page - this operation breaks ==)
log4j.logger.net.sf.hibernate.impl.SessionImpl=ERROR, confluencelog

# suppress PDF export logs to errors only
log4j.logger.com.atlassian.confluence.importexport.impl.PdfExporter=ERROR, confluencelog
log4j.additivity.com.atlassian.confluence.importexport.impl.PdfExporter=false

log4j.logger.org.apache.fop=ERROR, confluencelog
log4j.additivity.org.apache.fop=false

# suppress FileUtils (file management) warnings
log4j.logger.com.atlassian.core.util.FileUtils=ERROR, confluencelog

# suppress hibernate CustomType warnings
# (BlobInputStreamType is not a serializable custom type)
log4j.logger.net.sf.hibernate.type.CustomType=ERROR, confluencelog

#log4j.logger.bucket.search=DEBUG
#log4j.logger.org.apache.lucene.search=DEBUG
#log4j.logger.com.atlassian.confluence.search=DEBUG
#log4j.logger.com.atlassian.confluence.search.summary=INFO
#log4j.logger.com.atlassian.confluence.search.UnindexingHibernateInterceptor=DEBUG, confluencelog
#log4j.additivity.com.atlassian.confluence.search.UnindexingHibernateInterceptor=false

### useful confluence classes
#log4j.logger.com.atlassian.confluence=INFO, confluencelog
#log4j.additivity.com.atlassian.confluence=false
#log4j.logger.com.atlassian.confluence.setup=DEBUG, confluencelog
#log4j.logger.com.atlassian.confluence.setup.actions=DEBUG, confluencelog
#log4j.logger.com.atlassian.confluence.util=DEBUG, confluencelog

### show progress building of ANCESTOR table
#log4j.logger.com.atlassian.confluence.util.AncestorTableBuilder=INFO, confluencelog

### hibernate caching activity
#log4j.logger.net.sf.hibernate.cache=DEBUG

### log prepared statement cache activity ###
#log4j.logger.net.sf.hibernate.ps.PreparedStatementCache=DEBUG

### opensymphony (sitemesh, webwork, xwork)
#log4j.logger.com.opensymphony=DEBUG, confluencelog

### Spring
# log4j.logger.org.springframework=WARN, confluencelog
# log4j.logger.springframework.transaction.support.TransactionSynchronizationManager=DEBUG
# com.atlassian.config.FlushingSpringSessionInViewFilterForHibernate=DEBUG
# log4j.additivity.org.springframework=true

### Apache stuff
# log4j.logger.org.apache=WARN, confluencelog
# log4j.additivity.org.apache=false

### WIKI Engine
#log4j.logger.com.atlassian.confluence.importexport=WARN, confluencelog
#log4j.logger.com.atlassian.renderer=WARN, confluencelog

### Plugin subsystem
#log4j.logger.com.atlassian.plugin=DEBUG, confluencelog

###
# Log smartlist queries
###
#log4j.logger.com.atlassian.confluence.core.LuceneSmartListManager=DEBUG, confluencelog
#log4j.additivity.com.atlassian.confluence.core.LuceneSmartListManager=false

####
# PROFILING LOG APPENDER
###
#log4j.appender.profiling=com.atlassian.confluence.util.profiling.ProfilingLogAppender
#log4j.appender.profiling.Threshold=DEBUG
#log4j.appender.profiling.layout=org.apache.log4j.PatternLayout
#log4j.appender.profiling.layout.ConversionPattern=%d %p [%c{4}] %m%n

## Atlassian Profiling
log4j.logger.com.atlassian.util.profiling.UtilTimerStack=DEBUG, confluencelog
log4j.additivity.com.atlassian.util.profiling.UtilTimerStack=false

## profiling debugging
#log4j.logger.net.sf.hibernate.cache.ReadWriteCache=DEBUG, profiling
#log4j.logger.com.atlassian.config.FlushingSpringSessionInViewFilterForHibernate=DEBUG, profiling
#log4j.logger.com.atlassian.confluence.util=DEBUG, profiling
#log4j.logger.org.springframework.orm.hibernate.HibernateTransactionManager=DEBUG, profiling
#log4j.logger.com.opensymphony.oscache.web.filter=DEBUG, profiling
#log4j.logger.net.sf.hibernate.ps.PreparedStatementCache=DEBUG, profiling
#log4j.logger.net.sf.hibernate.type=DEBUG, profiling

####
# Access log configuration
####
# Uncomment the lines below and the access log filter-mapping in web.xml to enable the logging
# You will probably want to create a new appender so that access log messages go to a different file.
#log4j.category.com.atlassian.confluence.util.AccessLogFilter=INFO, confluencelog
#log4j.additivity.com.atlassian.confluence.util.AccessLogFilter=false

## caching debugging
#log4j.logger.com.atlassian.confluence.cache=DEBUG, confluencelog
#log4j.additivity.com.atlassian.confluence.cache=false

## indexing debugging
#log4j.logger.com.atlassian.confluence.search.lucene=DEBUG, confluencelog
#log4j.additivity.com.atlassian.confluence.search.lucene=false


## Debugging these classes to find problems with PagePermissionsAcceptanceTests in Tomcat postgres cluster.
log4j.logger.com.atlassian.user.impl.cache.CachingUserManager=DEBUG, confluencelog
log4j.additivity.com.atlassian.user.impl.cache.CachingUserManager=false
log4j.logger.com.atlassian.confluence.test.rpc.FuncTestRpcHandlerImpl=DEBUG, confluencelog
log4j.additivity.com.atlassian.confluence.test.rpc.FuncTestRpcHandlerImpl=false
log4j.logger.com.atlassian.user.impl.hibernate.HibernateUserManager=DEBUG, confluencelog
log4j.additivity.com.atlassian.user.impl.hibernate.HibernateUserManager=false

# Debugging to troubleshoot duplicate key in BANDANA table problem
#log4j.logger.com.atlassian.hibernate.ResettableTableHiLoGenerator=DEBUG, confluencelog
#log4j.additivity.com.atlassian.hibernate.ResettableTableHiLoGenerator=false
