Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logback configs + update logback #1868

Merged
merged 2 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion org.hl7.fhir.r4/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<configuration scan="true" scanPeriod="30 seconds">
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
Expand Down
2 changes: 1 addition & 1 deletion org.hl7.fhir.r4b/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<configuration scan="true" scanPeriod="30 seconds">
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
Expand Down
2 changes: 1 addition & 1 deletion org.hl7.fhir.r5/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<configuration scan="true" scanPeriod="30 seconds">
<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,10 @@ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWIS



import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;

import javax.annotation.Nonnull;

import org.hl7.fhir.utilities.Utilities;

/**
* see security.md - manages logging by the FHIR HAPI Core library
*
Expand All @@ -60,7 +50,7 @@ public interface ILoggingProvider {
public enum LoggingPolicy {
CONSOLE, // log messages go to System.out (default)
IGNORED, // log messages don't go anywhere
LOG4J, // log messages go to Log4J
SLF4J, // log messages go to SLF4J
CUSTOM, // log messages to an ILoggingProvider implementation
}

Expand Down Expand Up @@ -98,7 +88,7 @@ public static void log(String message) throws IOException {
case IGNORED:
// nothing
break;
case LOG4J:
case SLF4J:
// todo
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion org.hl7.fhir.validation.cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<excludes>**/module-info.class,META-INF/*</excludes>
<excludes>**/module-info.class,META-INF/*,logback-test.xml</excludes>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
Expand Down
3 changes: 1 addition & 2 deletions org.hl7.fhir.validation.cli/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<configuration scan="true" scanPeriod="30 seconds">

<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ private void displayHelpForTask(CliTask cliTask) {
}

public static void main(String[] args) throws Exception {
// Prevents SLF4J(I) from printing unnecessary info to the console.
System.setProperty("slf4j.internal.verbosity", "WARN");

final ValidatorCli validatorCli = new ValidatorCli(validationService);

args = addAdditionalParamsForIpsParam(args);
Expand Down
4 changes: 1 addition & 3 deletions org.hl7.fhir.validation/src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<configuration scan="true" scanPeriod="30 seconds">

<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
Expand All @@ -12,5 +11,4 @@
<root level="info">
<appender-ref ref="STDOUT" />
</root>

</configuration>
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
<maven.compiler.testTarget>11</maven.compiler.testTarget>
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
<checkstyle_config_location>${project.basedir}</checkstyle_config_location>
<logback-classic.version>1.5.15</logback-classic.version>
<logback.version>1.5.15</logback.version>
</properties>

<name>HL7 Core Artifacts</name>
Expand Down Expand Up @@ -313,13 +315,13 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.13</version>
<version>${logback-classic.version}</version>
</dependency>

<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.5.13</version>
<version>${logback.version}</version>
</dependency>

<dependency>
Expand Down
Loading