Skip to content

Commit

Permalink
revert logging updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylong committed Sep 18, 2022
1 parent f622e11 commit cc993ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 1 addition & 3 deletions cli/src/main/java/org/owasp/dependencycheck/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
import org.owasp.dependencycheck.utils.Settings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.impl.StaticLoggerBinder;

import ch.qos.logback.core.FileAppender;
import ch.qos.logback.classic.encoder.PatternLayoutEncoder;
Expand Down Expand Up @@ -658,8 +657,7 @@ private String getDefaultCveUrlModified(CliParser cli) {
* @param verboseLog the path to the verbose log file
*/
private void prepareLogger(String verboseLog) {
final StaticLoggerBinder loggerBinder = StaticLoggerBinder.getSingleton();
final LoggerContext context = (LoggerContext) loggerBinder.getLoggerFactory();
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();

final PatternLayoutEncoder encoder = new PatternLayoutEncoder();
encoder.setPattern("%d %C:%L%n%-5level - %msg%n");
Expand Down
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,11 @@ Copyright (c) 2012 - Jeremy Long

<apache.lucene.version>8.11.2</apache.lucene.version>
<apache.ant.version>1.10.12</apache.ant.version>
<slf4j.version>2.0.0</slf4j.version>

<!-- upgrading slf4j and logback can cause issues ;) https://github.com/jeremylong/DependencyCheck/issues/4846 -->
<slf4j.version>1.7.36</slf4j.version>
<logback.version>1.2.11</logback.version>

<!-- Note that Maven will use classes from the distro, ignoring declared dependencies for Maven core... -->
<maven.api.version>3.1.0</maven.api.version>
<reporting.checkstyle-plugin.version>3.2.0</reporting.checkstyle-plugin.version>
Expand Down

0 comments on commit cc993ca

Please sign in to comment.