Skip to content

Commit

Permalink
Fix and update logging setup (#129)
Browse files Browse the repository at this point in the history
- Set up logging to file for testing (log/oersi-etl.log)
- Downgrade metafacture-core dependencies to 5.3.0-rc2
(which works around logging-related issues with a third-party lib,
see metafacture/metafacture-core#360)
- Update slf4j and log4j dependencies to current releases
  • Loading branch information
fsteeg committed Dec 22, 2021
1 parent bf44a9a commit 875ccca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
28 changes: 14 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,31 +30,31 @@ dependencies {
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:26.0-jre'
implementation 'org.jooq:joox-java-6:1.6.0'
implementation 'org.metafacture:metafacture-io:5.3.1'
implementation 'org.metafacture:metafacture-plumbing:5.3.1'
implementation 'org.metafacture:metafacture-strings:5.3.1'
implementation 'org.metafacture:metafacture-triples:5.3.1'
implementation 'org.metafacture:metafacture-formatting:5.3.1'
implementation 'org.metafacture:metafacture-monitoring:5.3.1'
implementation ('org.metafacture:metafacture-runner:5.3.1'){
implementation 'org.metafacture:metafacture-io:5.3.0-rc2'
implementation 'org.metafacture:metafacture-plumbing:5.3.0-rc2'
implementation 'org.metafacture:metafacture-strings:5.3.0-rc2'
implementation 'org.metafacture:metafacture-triples:5.3.0-rc2'
implementation 'org.metafacture:metafacture-formatting:5.3.0-rc2'
implementation 'org.metafacture:metafacture-monitoring:5.3.0-rc2'
implementation ('org.metafacture:metafacture-runner:5.3.0-rc2'){
exclude group: 'org.antlr', module: 'antlr'
}
implementation 'org.metafacture:metafacture-json:5.3.1'
implementation 'org.metafacture:metafacture-html:5.3.1'
implementation 'org.metafacture:metafacture-elasticsearch:5.3.1'
implementation 'org.metafacture:metafacture-xml:5.3.1'
implementation 'org.metafacture:metafacture-json:5.3.0-rc2'
implementation 'org.metafacture:metafacture-html:5.3.0-rc2'
implementation 'org.metafacture:metafacture-elasticsearch:5.3.0-rc2'
implementation 'org.metafacture:metafacture-xml:5.3.0-rc2'
implementation 'org.metafacture:metafacture-fix:0.2.0-rc2'
implementation 'org.metafacture:metafix:0.2.0-rc7'
implementation('org.metafacture:metafacture-biblio:5.3.1') {
implementation('org.metafacture:metafacture-biblio:5.3.0-rc2') {
exclude group: 'xml-apis', module: 'xml-apis'
}
// Required after upgrade to Gradle 7.2 in metafacture-fix:
// (TODO: avoid RecognitionException/Flux.main in ETL.java)
implementation "org.antlr:antlr-runtime:3.2"
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.10.4'
implementation 'com.github.java-json-tools:json-schema-validator:2.2.14'
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'org.apache.logging.log4j:log4j-core:2.16.0'
implementation 'org.slf4j:slf4j-api:1.7.32'
implementation 'org.apache.logging.log4j:log4j-core:2.17.0'
implementation 'org.apache.commons:commons-text:1.9'

// Test frameworks:
Expand Down
8 changes: 6 additions & 2 deletions src/main/resources/log4j.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# Set root logger to INFO or DEBUG to see detailed output from Metafacture etc.
log4j.rootLogger=WARN, stdout
log4j.rootLogger=WARN, stdout, file
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=log/oersi-etl.log

# Set oersi logger to DEBUG or TRACE to see detailed output from the ETL processes
log4j.logger.oersi=INFO

# The format of log messages:
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.conversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%p] [%c{1}:%L] %m%n
log4j.appender.stdout.layout.conversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%p] [%c{1}:%L] %m%n
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.conversionPattern=%d{yyyy-MM-dd HH:mm:ss} [%p] [%c{1}:%L] %m%n

0 comments on commit 875ccca

Please sign in to comment.