Skip to content

Commit

Permalink
make log file location configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanzadelhoff committed Oct 12, 2020
1 parent 3e1833f commit e32a5cb
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
12 changes: 7 additions & 5 deletions build.properties.sample
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
oai-pmh.base.url.external=http:https://localhost:8080/omdf

db.item.csw.TYPE=inspire
db.item.csw.URL=https://localhost:8080/soapServices/CSWStartup
oai-pmh.db.item.csw.TYPE=inspire
oai-pmh.db.item.csw.URL=https://localhost:8080/soapServices/CSWStartup

db.item.ckan.TYPE=ckan
db.item.ckan.URL=https://localhost:9090
oai-pmh.db.item.ckan.TYPE=ckan
oai-pmh.db.item.ckan.URL=https://localhost:9090

dcatde.contributorID=http:https://dcat-ap.de/def/contributors/gdiDE
oai-pmh.dcatde.contributorID=http:https://dcat-ap.de/def/contributors/gdiDE

oai-pmh.log.file=${catalina.base}/logs/open-nrw-ci-fassaden.log
35 changes: 32 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@
<artifactId>maven-dependency-plugin</artifactId>
<version>2.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand All @@ -237,6 +242,14 @@
<spring.version>5.1.6.RELEASE</spring.version>
<spring-boot.version>2.1.4.RELEASE</spring-boot.version>
<spring-framework.version>${spring.version}</spring-framework.version>

<oai-pmh.base.url.external>http:https://localhost:8080/omdf</oai-pmh.base.url.external>
<oai-pmh.db.item.csw.TYPE>inspire</oai-pmh.db.item.csw.TYPE>
<oai-pmh.db.item.csw.URL>https://localhost:8080/soapServices/CSWStartup</oai-pmh.db.item.csw.URL>
<oai-pmh.db.item.ckan.TYPE>ckan</oai-pmh.db.item.ckan.TYPE>
<oai-pmh.db.item.ckan.URL>https://localhost:9090</oai-pmh.db.item.ckan.URL>
<oai-pmh.dcatde.contributorID>http:https://dcat-ap.de/def/contributors/gdiDE</oai-pmh.dcatde.contributorID>
<oai-pmh.log.file>/var/log/inspire-bridge/inspire-bridge.log</oai-pmh.log.file>
</properties>
<profiles>
<profile>
Expand All @@ -255,9 +268,25 @@
<local.configfile>${basedir}/build.properties</local.configfile>
</properties>
<build>
<filters>
<filter>${local.configfile}</filter>
</filters>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${local.configfile}</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/log4j.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</layout>
</appender>
<appender name="LOGFILE" class="org.apache.log4j.RollingFileAppender">
<param name="File" value="/var/log/inspire-bridge/inspire-bridge.log"/>
<param name="File" value="${oai-pmh.log.file.file}"/>
<param name="Threshold" value="TRACE"/>
<param name="MaxFileSize" value="5000KB"/>
<param name="MaxBackupIndex" value="3"/>
Expand Down

0 comments on commit e32a5cb

Please sign in to comment.