db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g.@apache.org
Subject svn commit: r1870382 - in /db/torque/torque4/trunk/torque-generator: ./ src/main/java/org/apache/torque/generator/control/ src/main/java/org/apache/torque/generator/outlet/ src/main/resources/org/apache/torque/generator/
Date Mon, 25 Nov 2019 14:27:44 GMT
Author: gk
Date: Mon Nov 25 14:27:44 2019
New Revision: 1870382

URL: http://svn.apache.org/viewvc?rev=1870382&view=rev
Log:
- correct logging behaviour
- remove log4j configuration (src/test/resources/log4j-test.xml still there)

Removed:
    db/torque/torque4/trunk/torque-generator/src/main/resources/org/apache/torque/generator/log4j2.xml
Modified:
    db/torque/torque4/trunk/torque-generator/pom.xml
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java
    db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/OutletImpl.java

Modified: db/torque/torque4/trunk/torque-generator/pom.xml
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/pom.xml?rev=1870382&r1=1870381&r2=1870382&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/pom.xml (original)
+++ db/torque/torque4/trunk/torque-generator/pom.xml Mon Nov 25 14:27:44 2019
@@ -50,18 +50,12 @@
         </exclusion>
       </exclusions>
     </dependency>
-    <dependency>
+    
+   <dependency>
       <groupId>org.apache.logging.log4j</groupId>
       <artifactId>log4j-1.2-api</artifactId>
     </dependency>
     
-    <!-- this is needed for velocity 2.0, it contains slf4j-api -->
-    <!--dependency>
-      <groupId>org.apache.logging.log4j</groupId>
-      <artifactId>log4j-slf4j-impl</artifactId>
-      <version>${log4j2.version}</version>
-      <scope>runtime</scope>
-    </dependency-->
     <dependency>
       <groupId>org.apache.commons</groupId>
       <artifactId>commons-lang3</artifactId>
@@ -182,12 +176,19 @@
       </exclusions-->
     </dependency>
     
-     <dependency>
+    <dependency>
         <groupId>org.xmlunit</groupId>
         <artifactId>xmlunit-core</artifactId>
         <version>2.6.2</version>
         <scope>test</scope>
-     </dependency>
+    </dependency>
+    <!-- this is needed for velocity 2.0, it contains slf4j-api -->
+    <dependency>
+      <groupId>org.apache.logging.log4j</groupId>
+      <artifactId>log4j-slf4j-impl</artifactId>
+      <version>${log4j2.version}</version>
+      <scope>test</scope>
+    </dependency>
 
     <dependency>
       <groupId>org.mockito</groupId>

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java?rev=1870382&r1=1870381&r2=1870382&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/control/Controller.java
Mon Nov 25 14:27:44 2019
@@ -132,7 +132,7 @@ public class Controller
     public void run(final List<UnitDescriptor> unitDescriptors)
             throws GeneratorException
     {
-        initLogging();
+        checkLogging();
         sourceModifiedCache.clear();
         final Configuration configuration = readConfiguration(unitDescriptors);
 
@@ -156,7 +156,7 @@ public class Controller
      * Initializes the Logging.
      * 
      */
-    protected void initLogging()
+    protected void checkLogging()
     {
         String log4jConfiguration = System.getProperty("log4j2.configuration");
         if (log4jConfiguration != null)
@@ -164,18 +164,19 @@ public class Controller
             log.info("Using external log4j2 configuration from " + log4jConfiguration);
             return;
         }
-
-        final InputStream log4jStream
+        /*final InputStream log4jStream
         = Controller.class.getClassLoader().getResourceAsStream(
                 "org/apache/torque/generator/log4j2.xml");
-        ConfigurationSource source;
-        try {
-            source = new ConfigurationSource(log4jStream);
-            LoggerContext lc = (LoggerContext) LogManager.getContext(false);
-            lc.start( ConfigurationFactory.getInstance().getConfiguration(lc, source));
-        } catch (IOException e) {
-            log.error(e.getMessage(),e);
-        }
+        ConfigurationSource source = null;
+        if (log4jStream != null) {
+            try {
+                source = new ConfigurationSource(log4jStream);
+                LoggerContext lc = (LoggerContext) LogManager.getContext(false);
+                lc.start( ConfigurationFactory.getInstance().getConfiguration(lc, source));
+            } catch (IOException e) {
+                log.error(e.getMessage(),e);
+            }
+        }*/
     }
 
     /**

Modified: db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/OutletImpl.java
URL: http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/OutletImpl.java?rev=1870382&r1=1870381&r2=1870382&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/OutletImpl.java
(original)
+++ db/torque/torque4/trunk/torque-generator/src/main/java/org/apache/torque/generator/outlet/OutletImpl.java
Mon Nov 25 14:27:44 2019
@@ -143,6 +143,7 @@ public abstract class OutletImpl impleme
                             + ", old mapping mapped to Actions "
                             + oldMapping.getActions());
         }
+        log.debug("adding mergepointMapping: " + mergepointMapping);
         mergepointMappings.put(mergepointMapping.getName(), mergepointMapping);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message