###########################################################################
# log4j.properties
#
# This is the primary log4j (logging) configuration file for DSpace. By default,
# Log4j is configured to write log files that rotate daily. However, you may
# tweak these settings based on your local needs / best practices.
# For more information on log4j configuration, see:
# https://logging.apache.org/log4j/1.2/manual.html
###########################################################################

# VARIABLES:
# The following variables can be used to easily tweak the default log4j settings.
# These variables are used by the log4j config / appenders later in this file.

# log.dir
#   Default log file directory for DSpace. Defaults to the 'log' subdirectory
#   under [dspace.dir]. NOTE: The value of 'dspace.dir' will be replaced by
#   its value in your configuration when DSpace is deployed (via Ant).
log.dir=${dspace.dir}/log

# loglevel.dspace
#   Log level for all DSpace-specific code (org.dspace.*)
#   Possible values (from most to least info): DEBUG, INFO, WARN, ERROR, FATAL
#   Defaults to INFO
loglevel.dspace=INFO

# loglevel.other
#   Log level for other third-party tools/APIs used by DSpace
#   Possible values (from most to least info): DEBUG, INFO, WARN, ERROR, FATAL
#   Defaults to INFO
loglevel.other=INFO

###########################################################################
# A1 is the name of the appender for most DSpace activity.
###########################################################################
# The root category is the default setting for all non-DSpace code.
# Change this from INFO to DEBUG to see extra logging created by non-DSpace
# code.
log4j.rootCategory=${loglevel.other}, A1
# This line sets the logging level for DSpace code. Set this to DEBUG to see
# extra detailed logging for DSpace code.
log4j.logger.org.dspace=${loglevel.dspace}, A1
# Do not change this line
log4j.additivity.org.dspace=false
# The name of the file appender
log4j.appender.A1=org.dspace.app.util.DailyFileAppender
# The filename of the log file created. A date stamp is appended to this
log4j.appender.A1.File=${log.dir}/dspace.log
# Set this to yyyy-MM-DD for daily log files, or yyyy-MM for monthly files
log4j.appender.A1.DatePattern=yyyy-MM-dd
# The number of log files to keep, or 0 to keep them all
log4j.appender.A1.MaxLogs=0
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d %-5p %c @ %m%n


###########################################################################
# A2 is the name of the appender for the Checksum Checker
###########################################################################
# This line sets the logging level for the checksum checker log file.
# Set this to DEBUG to see extra detailed logging.
log4j.logger.org.dspace.checker=INFO, A2
# Do not change this line
log4j.additivity.org.dspace.checker=false
# The name of the file appender
log4j.appender.A2=org.dspace.app.util.DailyFileAppender
# The filename of the log file created. A date stamp is appended to this
log4j.appender.A2.File=${log.dir}/checker.log
# Set this to yyyy-MM-DD for daily log files, or yyyy-MM for monthly files
log4j.appender.A2.DatePattern=yyyy-MM-dd
# The number of log files to keep, or 0 to keep them all
log4j.appender.A2.MaxLogs=0
# A2 uses PatternLayout.
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=%m%n


###########################################################################
# A3 is the name of the appender for Cocoon (XMLUI only)
###########################################################################
# These lines sets the logging level for the cocoon log file.
# Set these to DEBUG to see extra detailed logging.
log4j.logger.org.apache.cocoon=INFO, A3
log4j.logger.cocoon=INFO, A3
log4j.logger.org.springframework=INFO, A3
# Do not change these lines
log4j.additivity.org.apache.cocoon=false
log4j.additivity.cocoon=false
log4j.additivity.org.springframework=false
# The name of the file appender
log4j.appender.A3=org.dspace.app.util.DailyFileAppender
# The filename of the log file created. A date stamp is appended to this
log4j.appender.A3.File=${log.dir}/cocoon.log
# Set this to yyyy-MM-DD for daily log files, or yyyy-MM for monthly files
log4j.appender.A3.DatePattern=yyyy-MM-dd
# The number of log files to keep, or 0 to keep them all
log4j.appender.A3.MaxLogs=14
# A2 uses PatternLayout.
log4j.appender.A3.layout=org.apache.log4j.PatternLayout
log4j.appender.A3.layout.ConversionPattern=%d %-5p %c %x - %m%n


###########################################################################
# Other settings
###########################################################################

# Block passwords from being exposed in Axis logs.
# (DEBUG exposes passwords in Basic Auth)
log4j.logger.org.apache.axis.handlers.http.HTTPAuthHandler=INFO

# Block services logging except on exceptions
log4j.logger.org.dspace.kernel=ERROR
log4j.logger.org.dspace.services=ERROR
log4j.logger.org.dspace.servicemanager=ERROR
log4j.logger.org.dspace.providers=ERROR
log4j.logger.org.dspace.utils=ERROR
