Skip to content

Commit

Permalink
Add log4j logging and bridge (#383)
Browse files Browse the repository at this point in the history
Enables logging.
  • Loading branch information
dr0i committed Nov 22, 2024
1 parent 93afd59 commit f9c655f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions metafix-runner/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ dependencies {
implementation "org.metafacture:metafacture-xml:${versions.metafacture}"
implementation "org.metafacture:metafacture-yaml:${versions.metafacture}"
implementation "org.metafacture:metamorph:${versions.metafacture}"
runtimeOnly 'org.apache.logging.log4j:log4j-core'
implementation 'org.apache.logging.log4j:log4j-1.2-api:2.9.1'
implementation 'ch.qos.logback:logback-classic:1.3.14'

implementation('org.antlr:antlr-runtime') {
version { strictly versions.antlr }
Expand Down
18 changes: 18 additions & 0 deletions metafix/src/main/resources/log4j.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">

<log4j:configuration>
<appender name="stdout" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%-5p [%t] [%c{1}] %m%n" />
</layout>
</appender>

<root>
<priority value="INFO" />
<appender-ref ref="stdout" />
</root>

</log4j:configuration>

0 comments on commit f9c655f

Please sign in to comment.