Skip to content

Commit

Permalink
Updated logging configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Tore Kasper Frederiksen committed May 10, 2022
1 parent 1e55687 commit ceaf705
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 47 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,19 @@ dependencies {
runtimeOnly 'ch.qos.logback:logback-classic:[1.2.11, 2)'
implementation 'org.bouncycastle:bcprov-jdk15on:[1.70,)'
implementation 'org.bouncycastle:bcpkix-jdk15on:[1.70,)'
implementation 'org.apache.logging.log4j:log4j-to-slf4j:[2.17.1, 3)'
implementation 'org.apache.logging.log4j:log4j-to-slf4j:[2.17.2, 3)'
testImplementation 'org.junit.jupiter:junit-jupiter-api:[5.8.2, 6)'
intTestImplementation 'org.junit.jupiter:junit-jupiter-api:[5.8.2, 6)'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:[5.8.2, 6)'
intTestRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:[5.8.2, 6)'
implementation 'org.web3j:core:[4,5.0.0)'
implementation 'com.auth0:java-jwt:[3, 4)'
implementation 'com.auth0:java-jwt:[3.19.1, 4)'
implementation 'org.json:json:20220320' // To ensure obsolete trulioo code can compile
implementation group: 'com.github.cliftonlabs', name: 'json-simple', version: '[4.0.1, 5)'
implementation group: 'commons-cli', name: 'commons-cli', version: '[1.5.0, 2)'
implementation group: 'com.google.code.gson', name: 'gson', version: '[2.9.0, 3)'
testImplementation 'org.mockito:mockito-core:[4.4.0, 5)'
implementation 'com.fasterxml.jackson.core:jackson-databind:[2.13.2.1,)'
testImplementation 'org.mockito:mockito-core:[4.5.1, 5)'
implementation 'com.fasterxml.jackson.core:jackson-databind:[2.13.2.2,)'
implementation group: 'org.java-websocket', name: 'Java-WebSocket', version: '[1.5.2,)'
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,6 @@ private static BigInteger normalizeS(BigInteger s, ECDomainParameters params) {
// Normalize number s to be the lowest of its two legal values
BigInteger half_curve = params.getN().shiftRight(1);
if (s.compareTo(half_curve) > 0) {
logger.info("Inverting s value");
return params.getN().subtract(s);
}
return s;
Expand Down
21 changes: 0 additions & 21 deletions src/main/resources/log4j2.xml

This file was deleted.

27 changes: 27 additions & 0 deletions src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<configuration>
<property name="LOG_FILE" value="LogFile" />
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_FILE}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${LOG_FILE}.%d{yyyy-MM-dd}.gz</fileNamePattern>

<!-- keep 30 days' worth of history capped at 200MB total size -->
<maxHistory>30</maxHistory>
<totalSizeCap>2GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<root level="warn">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
21 changes: 0 additions & 21 deletions src/test/resources/log4j2-test.xml

This file was deleted.

11 changes: 11 additions & 0 deletions src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>

<root level="info">
<appender-ref ref="STDOUT" />
</root>
</configuration>

0 comments on commit ceaf705

Please sign in to comment.