# This is the logging configuration for Confluence. This is standard log4j.configuration as
# described at http://logging.apache.org/log4j/1.2/manual.html
#
# To turn more verbose logging on - change "ERROR" to "WARN" or "DEBUG"

log4j.rootLogger=WARN, confluencelog, errorlog
#  ,  specialvelocitylog

###
# LOGGING LOCATION AND APPENDER
#
# Here we define the default appender which after bootstrap will log to logs/atlassian-confluence.log
# within your configured confluence.home. Prior to that, logging will be to the console.
#
# Use the ConsoleAppender for development to leave the logging configuration up to the app server/IDEA.
#
# If you want to log to a different location uncomment the RollingFileAppender line and the File setting
# as instructed below.
###
log4j.appender.confluencelog=com.atlassian.confluence.logging.ConfluenceHomeLogAppender
# Comment the above line and uncomment the following 2 lines if you want to log to a specific location
#log4j.appender.confluencelog=org.apache.log4j.RollingFileAppender
#log4j.appender.confluencelog.File=${catalina.home}/logs/atlassian-confluence.log
log4j.appender.confluencelog.Threshold=DEBUG
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.synchronylog=com.atlassian.confluence.logging.SynchronyLogAppender
# Comment the above line and uncomment the following 2 lines if you want to log to a specific location
#log4j.appender.synchronylog=org.apache.log4j.RollingFileAppender
#log4j.appender.synchronylog.File=${catalina.home}/logs/atlassian-synchrony.log
log4j.appender.synchronylog.Threshold=DEBUG
log4j.appender.synchronylog.MaxFileSize=20480KB
log4j.appender.synchronylog.MaxBackupIndex=5
log4j.appender.synchronylog.layout=com.atlassian.confluence.util.PatternLayoutWithContext
log4j.appender.synchronylog.layout.ConversionPattern=%d %p [%t] %m%n

#log4j.appender.luceneQuery=org.apache.log4j.ConsoleAppender
#log4j.appender.luceneQuery.Threshold=DEBUG
#log4j.appender.luceneQuery.layout=com.atlassian.confluence.util.PatternLayoutWithContext
#log4j.appender.luceneQuery.layout.ConversionPattern=%m%n

#log4j.appender.specialvelocitylog=org.apache.log4j.FileAppender
#log4j.appender.specialvelocitylog.bufferedIO=true
#log4j.appender.specialvelocitylog.File=velocity-webapp-output.log
#log4j.appender.specialvelocitylog.layout=org.apache.log4j.PatternLayout
#log4j.appender.specialvelocitylog.layout.ConversionPattern=%m%n

#log4j.logger.VELOCITY=DEBUG, specialvelocitylog
#log4j.additivity.VELOCITY=false

####################################
# LOGGING LEVELS
####################################

#log4j.logger.com.atlassian.confluence.core=DEBUG

#log4j.logger.com.atlassian.confluence.search=DEBUG

###
# Atlassian User
###
#log4j.logger.com.atlassian.user=DEBUG
#log4j.logger.com.atlassian.confluence.user=DEBUG
#log4j.logger.bucket.user=DEBUG
#log4j.logger.com.atlassian.seraph=DEBUG
#log4j.logger.com.opensymphony.user=DEBUG

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

###
# INFO logging for startup event
###
log4j.logger.com.atlassian.confluence.lifecycle=INFO

log4j.logger.com.atlassian.confluence.status.SystemErrorInformationLogger=INFO
###
# INFO logging for upgrade tasks.
###
log4j.logger.com.atlassian.confluence.upgrade=INFO

# Cluster events
log4j.logger.com.atlassian.confluence.cluster=INFO

# Cluster safety logging
log4j.logger.com.atlassian.confluence.cluster.safety=INFO

log4j.logger.com.atlassian.confluence.event.listeners.ResetHiLoAfterImportListener=INFO

log4j.logger.com.atlassian.confluence.admin.actions=INFO

# INFO logging for RPC actions
log4j.logger.com.atlassian.confluence.rpc.auth.TokenAuthenticationInvocationHandler=INFO

#log4j.logger.com.mchange.v2.resourcepool.BasicResourcePool=DEBUG

# Dont display web dependency resolution warnings, which can't be fixed on production
log4j.logger.com.atlassian.plugin.webresource.DefaultResourceDependencyResolver=ERROR

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

# We have too problems in Velocity at the moment to show errors by default. Fatal in Prod, Error in Dev
log4j.logger.velocity=FATAL

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

## lucene debugging
#log4j.logger.com.atlassian.confluence.search.lucene=DEBUG
#log4j.logger.com.atlassian.bonnie=DEBUG

# suppress WARN log statements from the CoherenceCacheStrategy class (CONF-2517 & CONFDEV-22887)
log4j.logger.com.atlassian.hibernate.extras.tangosol.CoherenceCacheStrategy=ERROR

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

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

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

## log hibernate prepared statements/SQL queries (equivalent to setting 'hibernate.show_sql' to 'true')
## DEBUG, TRACE or ALL is required to see query strings
log4j.logger.net.sf.hibernate.SQL=ERROR

## log hibernate prepared statement parameter values. Note: due to caching in net.sf.hibernate.type.NullableType, requires restart to take effect
## TRACE or ALL is required to see parameter values
## Note that log4j.appender.confluencelog.Threshold (or other appenders) also must be TRACE or ALL to see any trace messages in the logs
#log4j.logger.net.sf.hibernate.type=TRACE

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

# 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

# Log high-level import/export information
#log4j.logger.com.atlassian.confluence.importexport=INFO

# Log when imports begin and end to aid the understanding of memory spikes during monitoring.
log4j.logger.com.atlassian.confluence.importexport.actions.ImportLongRunningTask=INFO

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

log4j.logger.org.apache.fop=ERROR

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

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

# suppress WARN log statements from the ReadWriteCache, EhCacheProvider classes
log4j.logger.net.sf.hibernate.cache.ReadWriteCache=ERROR
log4j.logger.net.sf.hibernate.cache.EhCacheProvider=ERROR

#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

### useful confluence classes
#log4j.logger.com.atlassian.confluence=INFO
#log4j.logger.com.atlassian.confluence.setup=DEBUG
#log4j.logger.com.atlassian.confluence.setup.actions=DEBUG
#log4j.logger.com.atlassian.confluence.util=DEBUG

### show progress building of ANCESTOR table
#log4j.logger.com.atlassian.confluence.pages.ancestors.HibernatePageAncestorManager=INFO

### hibernate
#log4j.logger.net.sf.hibernate=DEBUG

### log JDBC bind parameters ###
# log4j.logger.net.sf.hibernate.type=DEBUG

### 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

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

# Suppress "Found more than one MBeanServer" warnings
log4j.logger.org.springframework.jmx.support.JmxUtils=ERROR

### Apache stuff
# log4j.logger.org.apache=WARN

# Suppress "Cookie rejected" messages from HttpClient
log4j.logger.org.apache.commons.httpclient.HttpMethodBase=ERROR

### WIKI Engine
#log4j.logger.com.atlassian.renderer=WARN

### Plugin subsystem
#log4j.logger.org.springframework.osgi=ALL
#log4j.logger.com.atlassian.plugin.osgi=DEBUG
#log4j.logger.com.atlassian.plugin.DefaultPluginManager=DEBUG

# Plugins can use "atlassian.plugin" loggers across all products (Platform 2.7 requirement)
log4j.logger.atlassian.plugin=INFO

###
# Log smartlist queries
###
#log4j.logger.com.atlassian.confluence.core.LuceneSmartListManager=DEBUG

####
# 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

## 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

## caching debugging
#log4j.logger.com.atlassian.confluence.cache=DEBUG

## indexing debugging
#log4j.logger.com.atlassian.confluence.search.lucene=DEBUG

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

#log4j.logger.com.atlassian.confluence.search.didyoumean.lucene.LuceneWordSuggester=DEBUG

# Default log level is WARN. If you want to log exceptions as well if an action is not found
# set the level to DEBUG
log4j.logger.com.atlassian.confluence.servlet.ConfluenceServletDispatcher=WARN

log4j.logger.com.atlassian.confluence.search.v2.lucene.SearcherAction=WARN
# , luceneQuery
#log4j.additivity.com.atlassian.confluence.search.v2.lucene.SearcherAction=false

# reduce the number of logs generated by the AbstractNoOpServlet
# http://jira.atlassian.com/browse/CONF-13496
log4j.logger.com.atlassian.core.servlet.AbstractNoOpServlet=ERROR

# Hide warnings logged by Shindig at startup (CONF-20692)
log4j.logger.org.apache.shindig.gadgets=ERROR

# We have some classes that don't have interfaces. We don't need to see a warning about this on every startup
log4j.logger.com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar=ERROR

# Provides visibility on what is happening on startup (notably when and how long the spring and plugin systems take to load)
log4j.logger.com.atlassian.plugin.manager.DefaultPluginManager=INFO
log4j.logger.org.springframework.web.context.ContextLoader=INFO

# CONF-17809
log4j.logger.org.apache.http.impl.client.DefaultRequestDirector=ERROR

# Embedded Crowd logging
log4j.logger.com.atlassian.crowd.embedded=INFO
log4j.logger.com.atlassian.crowd.directory=INFO
log4j.logger.com.atlassian.confluence.user.crowd=INFO
log4j.logger.com.atlassian.confluence.user.migration=INFO
log4j.logger.com.atlassian.confluence.user.DefaultUserAccessor=INFO
# log4j.logger.com.atlassian.confluence.cache.option.OptionalReadThroughCache=DEBUG
# log4j.logger.com.atlassian.confluence.upgrade.upgradetask.AtlassianUserToEmbeddedCrowdDataUpgradeTask=DEBUG
# log4j.logger.com.atlassian.crowd.embedded.hibernate2.batch.SpringHibernate2SessionFactory=DEBUG
# log4j.logger.com.atlassian.crowd.embedded.propertyset.DebugLoggingPropertySet=DEBUG
# log4j.logger.com.atlassian.crowd.directory.DbCachingRemoteDirectory=DEBUG
# log4j.logger.com.atlassian.crowd.directory.DbCachingRemoteDirectoryCache=DEBUG
# log4j.logger.com.atlassian.crowd.directory.SpringLDAPConnector=DEBUG
# log4j.logger.com.atlassian.crowd.directory.ldap.cache.RemoteDirectoryCacheRefresher=DEBUG
# log4j.logger.com.atlassian.crowd.manager.directory.DirectorySynchroniser=DEBUG

# Log failed login attempts when elevated security check is required - set level to DEBUG to log all failed attempts
log4j.logger.com.atlassian.confluence.security.login.DefaultLoginManager=INFO

# Scheduled Job Admin
#log4j.logger.com.atlassian.confluence.schedule=INFO
#log4j.logger.com.atlassian.confluence.plugins.schedule=INFO

# XHTML migration logging
log4j.logger.com.atlassian.confluence.content.render.xhtml.migration=INFO

# Prevent REST resources from WARNING when they receive a FORM post but use @FormParam to consume the body
log4j.logger.com.sun.jersey.spi.container.servlet.WebComponent=INFO

# EHCache logging
log4j.logger.net.sf.ehcache.pool.impl.DefaultSizeOfEngine=ERROR

log4j.logger.com.atlassian.confluence.cluster.hazelcast.HazelcastClusterSafetyManager=INFO
log4j.logger.cache.hazelcast.logging.LoggingInitialMembershipListener=INFO

# Synchrony logging
log4j.logger.com.atlassian.confluence.plugins.synchrony=INFO
log4j.logger.com.atlassian.confluence.plugins.synchrony.bootstrap.LoggingOutputHandler=DEBUG, synchronylog
log4j.additivity.com.atlassian.confluence.plugins.synchrony.bootstrap.LoggingOutputHandler=false

# Atlassian diagnostics logging
log4j.logger.atlassian-monitor=INFO, diagnostics
log4j.appender.diagnostics=com.atlassian.confluence.logging.AtlassianDiagnosticsLogAppender
log4j.appender.diagnostics.Threshold=DEBUG
log4j.appender.diagnostics.MaxFileSize=20480KB
log4j.appender.diagnostics.MaxBackupIndex=5
log4j.appender.diagnostics.layout=com.atlassian.confluence.util.PatternLayoutWithContext
log4j.appender.diagnostics.layout.ConversionPattern=[%d] %m%n
