mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
Reenable Ant filtering of specific configs which cannot utilize Commons Config. Also fix/cleanup Solr's log4j configuration.
This commit is contained in:
@@ -33,7 +33,16 @@
|
||||
<env-entry-type>java.lang.String</env-entry-type>
|
||||
</env-entry>
|
||||
-->
|
||||
<env-entry>
|
||||
<env-entry-name>solr/home</env-entry-name>
|
||||
<env-entry-value>${dspace.dir}/solr</env-entry-value>
|
||||
<env-entry-type>java.lang.String</env-entry-type>
|
||||
</env-entry>
|
||||
|
||||
<!-- Tell Solr where its log4j configuration is located -->
|
||||
<!-- NOTE: Solr cannot use the default DSpace log4j configuration as it isn't
|
||||
initialized until the DSpace Kernel starts up, and we don't want Solr to
|
||||
depend on the DSpace Kernel/API -->
|
||||
<context-param>
|
||||
<param-name>log4j.configuration</param-name>
|
||||
<param-value>${dspace.dir}/config/log4j-solr.properties</param-value>
|
||||
@@ -191,13 +200,4 @@
|
||||
<welcome-file>admin.html</welcome-file>
|
||||
</welcome-file-list>
|
||||
|
||||
<!-- People who want to hardcode their "Solr Home" directly into the
|
||||
WAR File can set the JNDI property here...
|
||||
-->
|
||||
<env-entry>
|
||||
<env-entry-name>solr/home</env-entry-name>
|
||||
<env-entry-value>${dspace.dir}/solr</env-entry-value>
|
||||
<env-entry-type>java.lang.String</env-entry-type>
|
||||
</env-entry>
|
||||
|
||||
</web-app>
|
||||
|
@@ -1,9 +1,19 @@
|
||||
# Logging level
|
||||
solr.log=logs/
|
||||
###########################################################################
|
||||
# log4j-solr.properties
|
||||
###########################################################################
|
||||
|
||||
# This is the log4j configuration file for the Solr webapp that comes bundled
|
||||
# with DSpace. Because Solr is a dependency, its log4j settings are kept separate
|
||||
# from the default DSpace log4j settings (in log4j.properties).
|
||||
#
|
||||
# Therefore, this log4j file is standalone. If you wish to tweak the location of
|
||||
# your Solr logs, you must do so within this file (or in your DSpace source code).
|
||||
|
||||
# Logging level for Solr
|
||||
log4j.rootLogger=INFO, file
|
||||
|
||||
# Console logging options. Switch the above from "file" to "CONSOLE" to enable
|
||||
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
|
||||
|
||||
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.CONSOLE.layout.ConversionPattern=%-4r [%t] %-5p %c %x \u2013 %m%n
|
||||
|
||||
@@ -13,7 +23,7 @@ log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.file.DatePattern='.'yyyy-MM-dd
|
||||
|
||||
#- File to log to and log format
|
||||
log4j.appender.file.File=${dspace.dir}/log/solr.log
|
||||
log4j.appender.file.File=${log.dir}/solr.log
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%d %-5p %c @ %m%n
|
||||
|
||||
|
@@ -325,6 +325,13 @@ Common usage:
|
||||
|
||||
<mkdir dir="config-temp" />
|
||||
|
||||
<!--
|
||||
Copy over all config files (not including dspace.cfg)
|
||||
-->
|
||||
<copy todir="config-temp" preservelastmodified="true" overwrite="true" failonerror="false">
|
||||
<fileset dir="config" excludes="dspace.cfg" />
|
||||
</copy>
|
||||
|
||||
<!--
|
||||
Copy designated dspace.cfg
|
||||
-->
|
||||
@@ -340,12 +347,28 @@ Common usage:
|
||||
<globmapper from="*" to="*.default" />
|
||||
</copy>
|
||||
|
||||
<!--
|
||||
Copy over all other config files (not including dspace.cfg)
|
||||
-->
|
||||
<!-- Finally, filter some very specific configuration files, which cannot
|
||||
be managed by DSpace's configuration service. NOTE: please refrain
|
||||
from appending files to this list unless ABSOLUTELY NECESSARY.
|
||||
Most config files are now auto-interpolated and don't need filtering! -->
|
||||
<copy todir="config-temp" preservelastmodified="true" overwrite="true" failonerror="false">
|
||||
<fileset dir="config" excludes="dspace.cfg" />
|
||||
<fileset dir="config">
|
||||
<!-- Filter extra (third-party) log4j files, as log4j requires absolute paths
|
||||
to its log files. This does NOT include the default log4j.properties file
|
||||
as its absolute paths are interpolated by DSpace's ConfigurationService. -->
|
||||
<include name="log4j-*.properties"/>
|
||||
<!-- Filter OAI-PMH description so it can include hostname and handle prefix -->
|
||||
<include name="crosswalks/oai/description.xml"/>
|
||||
<!-- Filter sample Tomcat context.xml -->
|
||||
<include name="default.context.xml"/>
|
||||
<!-- Filter RDF configs as these are TTL files -->
|
||||
<include name="modules/rdf/*.ttl"/>
|
||||
</fileset>
|
||||
<filterchain>
|
||||
<expandproperties />
|
||||
</filterchain>
|
||||
</copy>
|
||||
|
||||
<echo file='config-temp/ant.properties' message='ant.version = ${ant.version}'/>
|
||||
|
||||
</target>
|
||||
|
Reference in New Issue
Block a user