Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
7 changes: 7 additions & 0 deletions apache-maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ under the License.
<version>${slf4jVersion}</version>
<scope>runtime</scope>
</dependency>
<!-- bridge from java.util.logging (JUL) to SLF4J -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>${slf4jVersion}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-connector-basic</artifactId>
Expand Down
4 changes: 4 additions & 0 deletions impl/maven-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ under the License.
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
import org.jline.terminal.impl.AbstractPosixTerminal;
import org.jline.terminal.spi.TerminalExt;
import org.slf4j.LoggerFactory;
import org.slf4j.bridge.SLF4JBridgeHandler;
import org.slf4j.spi.LocationAwareLogger;

import static java.util.Objects.requireNonNull;
Expand Down Expand Up @@ -428,6 +429,9 @@ protected Consumer<String> doDetermineWriter(C context) {
}

protected void activateLogging(C context) throws Exception {
// Route java.util.logging (JUL) through SLF4J
SLF4JBridgeHandler.removeHandlersForRootLogger();
SLF4JBridgeHandler.install();
Comment thread
gnodet marked this conversation as resolved.
Outdated
Comment thread
gnodet marked this conversation as resolved.
Outdated
context.slf4jConfiguration.activate();
if (context.options().failOnSeverity().isPresent()) {
String logLevelThreshold = context.options().failOnSeverity().get();
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,11 @@ under the License.
<version>${slf4jVersion}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>${slf4jVersion}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down
Loading