# HG changeset patch # User Tom Gottfried # Date 1645797683 -3600 # Node ID 5cd1c627cda9b2c8ae50b27586785fee67540aea # Parent 48d14cf857dbb73ab8bf799a033db40aa6ee4e05 Rely on log4j's default initialization procedure This should make upgrading to Log4j 2.x easier. In passing, use latest Log4j 1. diff -r 48d14cf857db -r 5cd1c627cda9 artifact-database/pom.xml --- a/artifact-database/pom.xml Fri Feb 25 14:53:32 2022 +0100 +++ b/artifact-database/pom.xml Fri Feb 25 15:01:23 2022 +0100 @@ -74,17 +74,7 @@ log4j log4j - 1.2.14 - - - org.slf4j - jul-to-slf4j - 1.6.1 - - - org.slf4j - slf4j-log4j12 - 1.6.1 + 1.2.17 org.mortbay.jetty diff -r 48d14cf857db -r 5cd1c627cda9 artifact-database/src/main/java/org/dive4elements/artifactdatabase/App.java --- a/artifact-database/src/main/java/org/dive4elements/artifactdatabase/App.java Fri Feb 25 14:53:32 2022 +0100 +++ b/artifact-database/src/main/java/org/dive4elements/artifactdatabase/App.java Fri Feb 25 15:01:23 2022 +0100 @@ -8,17 +8,8 @@ package org.dive4elements.artifactdatabase; -import org.dive4elements.artifacts.common.utils.Config; - import org.dive4elements.artifactdatabase.rest.HTTPServer; -import java.io.File; - -import java.net.MalformedURLException; - -import org.apache.log4j.PropertyConfigurator; - -import org.slf4j.bridge.SLF4JBridgeHandler; /** * Starting point of the artifact database. @@ -28,38 +19,11 @@ public class App { /** - * The logging is done via Log4j. To configure the logging - * a file 'log4j.properties' is search in the configuration directory. - */ - public static final String LOG4J_PROPERTIES = - "log4j.properties"; - - /** - * Trys to load the Log4j configuration from ${config.dir}/log4j.properties. - */ - public static final void configureLogging() { - File configDir = Config.getConfigDirectory(); - File propFile = new File(configDir, LOG4J_PROPERTIES); - - if (propFile.isFile() && propFile.canRead()) { - try { - PropertyConfigurator.configure(propFile.toURI().toURL()); - SLF4JBridgeHandler.install(); - } - catch (MalformedURLException mue) { - mue.printStackTrace(System.err); - } - } - } - - /** * Starts the artifact database. * @param args The commandline arguments. Unused. */ public static void main(String[] args) { - configureLogging(); - FactoryBootstrap bootstrap = new FactoryBootstrap(); bootstrap.boot(); diff -r 48d14cf857db -r 5cd1c627cda9 artifacts-common/pom.xml --- a/artifacts-common/pom.xml Fri Feb 25 14:53:32 2022 +0100 +++ b/artifacts-common/pom.xml Fri Feb 25 15:01:23 2022 +0100 @@ -24,7 +24,7 @@ log4j log4j - 1.2.14 + 1.2.17 commons-codec