cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject [02/19] cayenne git commit: change logger in dbsync module
Date Wed, 26 Apr 2017 10:09:16 GMT
change logger in dbsync module


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/0312b96d
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/0312b96d
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/0312b96d

Branch: refs/heads/master
Commit: 0312b96d326063bc204064df1a4a1e83573b0ee4
Parents: fec6ede
Author: Maxim Petrusevich <maks1464@gmail.com>
Authored: Wed Apr 12 09:12:58 2017 +0300
Committer: Maxim Petrusevich <maks1464@gmail.com>
Committed: Wed Apr 12 09:12:58 2017 +0300

----------------------------------------------------------------------
 cayenne-dbsync/pom.xml                            | 18 ++++++++----------
 .../cayenne/dbsync/filter/NamePatternMatcher.java |  6 +++---
 .../dbsync/merge/context/EntityMergeSupport.java  |  6 +++---
 .../dbsync/reverse/configuration/ToolsModule.java |  8 ++++----
 .../reverse/dbimport/DbImportConfiguration.java   |  8 ++++----
 .../reverse/dbimport/DefaultDbImportAction.java   |  9 ++++-----
 .../dbimport/ManyToManyCandidateEntity.java       |  6 +++---
 .../dbsync/reverse/dbload/AttributeLoader.java    |  6 +++---
 .../dbsync/reverse/dbload/EntityLoader.java       |  6 +++---
 .../dbsync/reverse/dbload/ExportedKeyLoader.java  |  6 +++---
 .../reverse/dbload/LoggingDbLoaderDelegate.java   |  6 +++---
 .../dbsync/reverse/dbload/PrimaryKeyLoader.java   |  6 +++---
 .../reverse/dbload/ProcedureColumnLoader.java     |  6 +++---
 .../dbsync/reverse/dbload/ProcedureLoader.java    |  6 +++---
 .../dbsync/reverse/dbload/RelationshipLoader.java |  6 +++---
 .../apache/cayenne/dbsync/merge/MergeCase.java    |  8 ++++----
 .../reverse/configuration/ToolsModuleTest.java    |  8 ++++----
 .../reverse/dbimport/DbImportModuleTest.java      |  4 ++--
 .../dbimport/DefaultDbImportActionTest.java       |  6 +++---
 .../modeler/dialog/db/load/LoadDataMapTask.java   |  6 +++---
 .../dialog/db/load/ModelerDbImportAction.java     |  4 ++--
 .../modeler/dialog/db/merge/MergerOptions.java    |  4 ++--
 22 files changed, 73 insertions(+), 76 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/pom.xml
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/pom.xml b/cayenne-dbsync/pom.xml
index cf57b9a..34317e0 100644
--- a/cayenne-dbsync/pom.xml
+++ b/cayenne-dbsync/pom.xml
@@ -32,6 +32,14 @@
 	<name>cayenne-dbsync: Database Synchronization Tools</name>
 	<dependencies>
 		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-simple</artifactId>
+		</dependency>
+		<dependency>
 			<groupId>org.apache.cayenne</groupId>
 			<artifactId>cayenne-server</artifactId>
 			<version>${project.version}</version>
@@ -75,16 +83,6 @@
     		<artifactId>jcl-over-slf4j</artifactId>
     		<scope>test</scope>
 		</dependency>
-		<dependency>
-    		<groupId>org.slf4j</groupId>
-    		<artifactId>slf4j-api</artifactId>
-    		<scope>test</scope>
-		</dependency>
-		<dependency>
-    		<groupId>org.slf4j</groupId>
-    		<artifactId>slf4j-simple</artifactId>
-    		<scope>test</scope>
-		</dependency>
 
 		<dependency>
 			<groupId>org.apache.cayenne.build-tools</groupId>

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/filter/NamePatternMatcher.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/filter/NamePatternMatcher.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/filter/NamePatternMatcher.java
index cb379da..a70345c 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/filter/NamePatternMatcher.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/filter/NamePatternMatcher.java
@@ -20,7 +20,7 @@
 package org.apache.cayenne.dbsync.filter;
 
 import org.apache.cayenne.util.CayenneMapEntry;
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -49,7 +49,7 @@ public class NamePatternMatcher implements NameFilter {
     private final Pattern[] itemIncludeFilters;
     private final Pattern[] itemExcludeFilters;
 
-    public static NamePatternMatcher build(Log logger, String includePattern, String excludePattern)
{
+    public static NamePatternMatcher build(Logger logger, String includePattern, String excludePattern)
{
         return new NamePatternMatcher(createPatterns(logger, includePattern), createPatterns(logger,
excludePattern));
     }
 
@@ -101,7 +101,7 @@ public class NamePatternMatcher implements NameFilter {
      * <code>^billing_.*$</code><br>
      * <code>^user.?$</code><br>
      */
-    public static Pattern[] createPatterns(Log logger, String patternString) {
+    public static Pattern[] createPatterns(Logger logger, String patternString) {
         if (patternString == null) {
             return new Pattern[0];
         }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/context/EntityMergeSupport.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/context/EntityMergeSupport.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/context/EntityMergeSupport.java
index ae93916..09bdae3 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/context/EntityMergeSupport.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/merge/context/EntityMergeSupport.java
@@ -35,8 +35,8 @@ import org.apache.cayenne.map.ObjRelationship;
 import org.apache.cayenne.map.Relationship;
 import org.apache.cayenne.util.DeleteRuleUpdater;
 import org.apache.cayenne.util.EntityMergeListener;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.sql.Types;
 import java.util.ArrayList;
@@ -51,7 +51,7 @@ import java.util.Map;
  */
 public class EntityMergeSupport {
 
-    private static final Log LOGGER = LogFactory.getLog(EntityMergeSupport.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(EntityMergeSupport.class);
 
     private static final Map<String, String> CLASS_TO_PRIMITIVE = new HashMap<>();
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/configuration/ToolsModule.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/configuration/ToolsModule.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/configuration/ToolsModule.java
index 8fcafa7..d2c6b62 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/configuration/ToolsModule.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/configuration/ToolsModule.java
@@ -55,7 +55,7 @@ import org.apache.cayenne.log.CommonsJdbcEventLogger;
 import org.apache.cayenne.log.JdbcEventLogger;
 import org.apache.cayenne.resource.ClassLoaderResourceLocator;
 import org.apache.cayenne.resource.ResourceLocator;
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 
 /**
  * A DI module to bootstrap DI container for Cayenne Ant tasks and Maven
@@ -65,9 +65,9 @@ import org.apache.commons.logging.Log;
  */
 public class ToolsModule implements Module {
 
-    private Log logger;
+    private Logger logger;
 
-    public ToolsModule(Log logger) {
+    public ToolsModule(Logger logger) {
 
         if (logger == null) {
             throw new NullPointerException("Null logger");
@@ -78,7 +78,7 @@ public class ToolsModule implements Module {
 
     public void configure(Binder binder) {
 
-        binder.bind(Log.class).toInstance(logger);
+        binder.bind(Logger.class).toInstance(logger);
 
         // configure empty global stack properties
         ServerModule.contributeProperties(binder);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/DbImportConfiguration.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/DbImportConfiguration.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/DbImportConfiguration.java
index d7350e7..110a7ff 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/DbImportConfiguration.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/DbImportConfiguration.java
@@ -36,7 +36,7 @@ import org.apache.cayenne.dbsync.reverse.dbload.DbLoaderDelegate;
 import org.apache.cayenne.dbsync.reverse.dbload.DefaultDbLoaderDelegate;
 import org.apache.cayenne.dbsync.reverse.dbload.LoggingDbLoaderDelegate;
 import org.apache.cayenne.dbsync.reverse.filters.FiltersConfig;
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 
 import java.io.File;
 import java.util.regex.Pattern;
@@ -56,7 +56,7 @@ public class DbImportConfiguration {
     private String adapter;
     private boolean usePrimitives;
     private boolean useJava7Types;
-    private Log logger;
+    private Logger logger;
     private String namingStrategy;
     private String stripFromTableNames;
     private boolean forceDataMapCatalog;
@@ -75,11 +75,11 @@ public class DbImportConfiguration {
         this.stripFromTableNames = stripFromTableNames;
     }
 
-    public Log getLogger() {
+    public Logger getLogger() {
         return logger;
     }
 
-    public void setLogger(Log logger) {
+    public void setLogger(Logger logger) {
         this.logger = logger;
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/DefaultDbImportAction.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/DefaultDbImportAction.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/DefaultDbImportAction.java
index cd2838c..3ada4bd 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/DefaultDbImportAction.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/DefaultDbImportAction.java
@@ -23,7 +23,6 @@ import org.apache.cayenne.configuration.DataNodeDescriptor;
 import org.apache.cayenne.configuration.server.DataSourceFactory;
 import org.apache.cayenne.configuration.server.DbAdapterFactory;
 import org.apache.cayenne.dba.DbAdapter;
-import org.apache.cayenne.dbsync.filter.NameFilter;
 import org.apache.cayenne.dbsync.merge.token.model.AbstractToModelToken;
 import org.apache.cayenne.dbsync.merge.DataMapMerger;
 import org.apache.cayenne.dbsync.merge.context.MergerContext;
@@ -52,7 +51,7 @@ import org.apache.cayenne.resource.URLResource;
 import org.apache.cayenne.validation.SimpleValidationFailure;
 import org.apache.cayenne.validation.ValidationFailure;
 import org.apache.cayenne.validation.ValidationResult;
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 import org.xml.sax.InputSource;
 
 import javax.sql.DataSource;
@@ -74,13 +73,13 @@ import java.util.List;
 public class DefaultDbImportAction implements DbImportAction {
 
     private final ProjectSaver projectSaver;
-    private final Log logger;
+    private final Logger logger;
     private final DataSourceFactory dataSourceFactory;
     private final DbAdapterFactory adapterFactory;
     private final MapLoader mapLoader;
     private final MergerTokenFactoryProvider mergerTokenFactoryProvider;
 
-    public DefaultDbImportAction(@Inject Log logger,
+    public DefaultDbImportAction(@Inject Logger logger,
                                  @Inject ProjectSaver projectSaver,
                                  @Inject DataSourceFactory dataSourceFactory,
                                  @Inject DbAdapterFactory adapterFactory,
@@ -130,7 +129,7 @@ public class DefaultDbImportAction implements DbImportAction {
 
         if (logger.isDebugEnabled()) {
             logger.debug("DB connection: " + config.getDataSourceInfo());
-            logger.debug(config);
+            logger.debug(String.valueOf(config));
         }
 
         boolean hasChanges = false;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/ManyToManyCandidateEntity.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/ManyToManyCandidateEntity.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/ManyToManyCandidateEntity.java
index 3c3cbf3..404cd41 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/ManyToManyCandidateEntity.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbimport/ManyToManyCandidateEntity.java
@@ -24,8 +24,8 @@ import org.apache.cayenne.dbsync.naming.ObjectNameGenerator;
 import org.apache.cayenne.map.DbRelationship;
 import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.map.ObjRelationship;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -35,7 +35,7 @@ import java.util.List;
  */
 class ManyToManyCandidateEntity {
 
-    private static final Log LOG = LogFactory.getLog(ManyToManyCandidateEntity.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ManyToManyCandidateEntity.class);
 
     private final ObjEntity joinEntity;
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/AttributeLoader.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/AttributeLoader.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/AttributeLoader.java
index af44f7b..4731ccd 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/AttributeLoader.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/AttributeLoader.java
@@ -31,12 +31,12 @@ import org.apache.cayenne.dbsync.reverse.filters.PatternFilter;
 import org.apache.cayenne.dbsync.reverse.filters.SchemaFilter;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 class AttributeLoader extends PerCatalogAndSchemaLoader {
 
-    private static final Log LOGGER = LogFactory.getLog(DbLoader.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(DbLoader.class);
 
     private boolean firstRow;
     private boolean supportAutoIncrement;

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/EntityLoader.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/EntityLoader.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/EntityLoader.java
index 2531a3f..7d279a2 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/EntityLoader.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/EntityLoader.java
@@ -30,12 +30,12 @@ import org.apache.cayenne.dbsync.reverse.filters.CatalogFilter;
 import org.apache.cayenne.dbsync.reverse.filters.SchemaFilter;
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.DetectedDbEntity;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 class EntityLoader extends PerCatalogAndSchemaLoader {
 
-    private static final Log LOGGER = LogFactory.getLog(DbLoader.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(DbLoader.class);
 
     private final String[] types;
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ExportedKeyLoader.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ExportedKeyLoader.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ExportedKeyLoader.java
index 779218b..dfe38e6 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ExportedKeyLoader.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ExportedKeyLoader.java
@@ -24,12 +24,12 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 
 import org.apache.cayenne.map.DbEntity;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 class ExportedKeyLoader extends PerEntityLoader {
 
-    private static final Log LOGGER = LogFactory.getLog(ExportedKeyLoader.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(ExportedKeyLoader.class);
 
     ExportedKeyLoader(DbLoaderConfiguration config, DbLoaderDelegate delegate) {
         super(null, config, delegate);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/LoggingDbLoaderDelegate.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/LoggingDbLoaderDelegate.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/LoggingDbLoaderDelegate.java
index 70279c1..55a8874 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/LoggingDbLoaderDelegate.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/LoggingDbLoaderDelegate.java
@@ -20,16 +20,16 @@ package org.apache.cayenne.dbsync.reverse.dbload;
 
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.DbRelationship;
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 
 /**
  * @since 4.0
  */
 public class LoggingDbLoaderDelegate extends DefaultDbLoaderDelegate {
 
-    private final Log logger;
+    private final Logger logger;
 
-    public LoggingDbLoaderDelegate(Log logger) {
+    public LoggingDbLoaderDelegate(Logger logger) {
         this.logger = logger;
     }
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/PrimaryKeyLoader.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/PrimaryKeyLoader.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/PrimaryKeyLoader.java
index 4f80534..1f00f2b 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/PrimaryKeyLoader.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/PrimaryKeyLoader.java
@@ -26,12 +26,12 @@ import java.sql.SQLException;
 import org.apache.cayenne.map.DbAttribute;
 import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.DetectedDbEntity;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 class PrimaryKeyLoader extends PerEntityLoader {
 
-    private static final Log LOGGER = LogFactory.getLog(DbLoader.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(DbLoader.class);
 
     PrimaryKeyLoader(DbLoaderConfiguration config, DbLoaderDelegate delegate) {
         super(null, config, delegate);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ProcedureColumnLoader.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ProcedureColumnLoader.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ProcedureColumnLoader.java
index 8ac0fde..f4096a1 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ProcedureColumnLoader.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ProcedureColumnLoader.java
@@ -30,12 +30,12 @@ import org.apache.cayenne.dbsync.reverse.filters.PatternFilter;
 import org.apache.cayenne.dbsync.reverse.filters.SchemaFilter;
 import org.apache.cayenne.map.Procedure;
 import org.apache.cayenne.map.ProcedureParameter;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ProcedureColumnLoader extends PerCatalogAndSchemaLoader {
 
-    private static final Log LOGGER = LogFactory.getLog(DbLoader.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(DbLoader.class);
 
     ProcedureColumnLoader(DbAdapter adapter, DbLoaderConfiguration config, DbLoaderDelegate
delegate) {
         super(adapter, config, delegate);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ProcedureLoader.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ProcedureLoader.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ProcedureLoader.java
index 34808a0..d0b3636 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ProcedureLoader.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/ProcedureLoader.java
@@ -28,12 +28,12 @@ import org.apache.cayenne.dbsync.reverse.filters.CatalogFilter;
 import org.apache.cayenne.dbsync.reverse.filters.PatternFilter;
 import org.apache.cayenne.dbsync.reverse.filters.SchemaFilter;
 import org.apache.cayenne.map.Procedure;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class ProcedureLoader extends PerCatalogAndSchemaLoader {
 
-    private static final Log LOGGER = LogFactory.getLog(DbLoader.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(DbLoader.class);
 
     ProcedureLoader(DbAdapter adapter, DbLoaderConfiguration config, DbLoaderDelegate delegate)
{
         super(adapter, config, delegate);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/RelationshipLoader.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/RelationshipLoader.java
b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/RelationshipLoader.java
index 1b9e9db..46a1aa0 100644
--- a/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/RelationshipLoader.java
+++ b/cayenne-dbsync/src/main/java/org/apache/cayenne/dbsync/reverse/dbload/RelationshipLoader.java
@@ -31,12 +31,12 @@ import org.apache.cayenne.map.DbEntity;
 import org.apache.cayenne.map.DbJoin;
 import org.apache.cayenne.map.DbRelationship;
 import org.apache.cayenne.util.EqualsBuilder;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class RelationshipLoader extends AbstractLoader {
 
-    private static final Log LOGGER = LogFactory.getLog(DbLoader.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(DbLoader.class);
 
     private final ObjectNameGenerator nameGenerator;
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/merge/MergeCase.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/merge/MergeCase.java b/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/merge/MergeCase.java
index a8315ec..a1c4177 100644
--- a/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/merge/MergeCase.java
+++ b/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/merge/MergeCase.java
@@ -48,9 +48,9 @@ import org.apache.cayenne.unit.UnitDbAdapter;
 import org.apache.cayenne.unit.di.server.CayenneProjects;
 import org.apache.cayenne.unit.di.server.ServerCaseDataSourceFactory;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
 import org.junit.Before;
+import org.slf4j.LoggerFactory;
 
 import java.sql.Connection;
 import java.sql.SQLException;
@@ -69,7 +69,7 @@ public abstract class MergeCase extends DbSyncCase {
     @Inject
     protected DataNode node;
     protected DataMap map;
-    private Log logger = LogFactory.getLog(MergeCase.class);
+    private Logger logger = LoggerFactory.getLogger(MergeCase.class);
     @Inject
     private DBHelper dbHelper;
     @Inject
@@ -121,7 +121,7 @@ public abstract class MergeCase extends DbSyncCase {
         try (Connection conn = node.getDataSource().getConnection();) {
             dbImport = new DbLoader(node.getAdapter(), conn,
                     loaderConfiguration,
-                    new LoggingDbLoaderDelegate(LogFactory.getLog(DbLoader.class)),
+                    new LoggingDbLoaderDelegate(LoggerFactory.getLogger(DbLoader.class)),
                     new DefaultObjectNameGenerator(NoStemStemmer.getInstance()))
                     .load();
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/configuration/ToolsModuleTest.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/configuration/ToolsModuleTest.java
b/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/configuration/ToolsModuleTest.java
index 899b049..7381dd8 100644
--- a/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/configuration/ToolsModuleTest.java
+++ b/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/configuration/ToolsModuleTest.java
@@ -28,7 +28,7 @@ import org.apache.cayenne.di.AdhocObjectFactory;
 import org.apache.cayenne.di.DIBootstrap;
 import org.apache.cayenne.di.Injector;
 import org.apache.cayenne.di.spi.DefaultAdhocObjectFactory;
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 import org.junit.Test;
 
 import javax.sql.DataSource;
@@ -42,10 +42,10 @@ public class ToolsModuleTest {
     @Test
     public void testModuleContents() {
 
-        Log log = mock(Log.class);
+        Logger log = mock(Logger.class);
         Injector i = DIBootstrap.createInjector(new ToolsModule(log));
 
-        assertSame(log, i.getInstance(Log.class));
+        assertSame(log, i.getInstance(Logger.class));
         assertTrue(i.getInstance(DataSourceFactory.class) instanceof DriverDataSourceFactory);
         assertTrue(i.getInstance(AdhocObjectFactory.class) instanceof DefaultAdhocObjectFactory);
         assertTrue(i.getInstance(DbAdapterFactory.class) instanceof DefaultDbAdapterFactory);
@@ -53,7 +53,7 @@ public class ToolsModuleTest {
 
     @Test
     public void testDbApdater() throws Exception {
-        Log log = mock(Log.class);
+        Logger log = mock(Logger.class);
         Injector i = DIBootstrap.createInjector(new ToolsModule(log));
 
         DbAdapterFactory factory = i.getInstance(DbAdapterFactory.class);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/dbimport/DbImportModuleTest.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/dbimport/DbImportModuleTest.java
b/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/dbimport/DbImportModuleTest.java
index d057fda..b765516 100644
--- a/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/dbimport/DbImportModuleTest.java
+++ b/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/dbimport/DbImportModuleTest.java
@@ -23,7 +23,7 @@ import org.apache.cayenne.dbsync.DbSyncModule;
 import org.apache.cayenne.dbsync.reverse.configuration.ToolsModule;
 import org.apache.cayenne.di.DIBootstrap;
 import org.apache.cayenne.di.Injector;
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 import org.junit.Test;
 
 import static org.junit.Assert.assertTrue;
@@ -34,7 +34,7 @@ public class DbImportModuleTest {
     @Test
     public void testModuleContents() {
 
-        Log log = mock(Log.class);
+        Logger log = mock(Logger.class);
         Injector i = DIBootstrap.createInjector(new DbSyncModule(), new ToolsModule(log),
new DbImportModule());
         assertTrue(i.getInstance(DbImportAction.class) instanceof DbImportAction);
     }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/dbimport/DefaultDbImportActionTest.java
----------------------------------------------------------------------
diff --git a/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/dbimport/DefaultDbImportActionTest.java
b/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/dbimport/DefaultDbImportActionTest.java
index aeddd37..f390fef 100644
--- a/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/dbimport/DefaultDbImportActionTest.java
+++ b/cayenne-dbsync/src/test/java/org/apache/cayenne/dbsync/reverse/dbimport/DefaultDbImportActionTest.java
@@ -50,7 +50,7 @@ import org.apache.cayenne.project.FileProjectSaver;
 import org.apache.cayenne.project.Project;
 import org.apache.cayenne.resource.URLResource;
 import org.apache.cayenne.util.Util;
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 import org.junit.Before;
 import org.junit.Test;
 import org.xml.sax.InputSource;
@@ -281,7 +281,7 @@ public class DefaultDbImportActionTest {
     private DefaultDbImportAction buildDbImportAction(FileProjectSaver projectSaver, MapLoader
mapLoader, final DbLoader dbLoader)
             throws Exception {
 
-        Log log = mock(Log.class);
+        Logger log = mock(Logger.class);
         when(log.isDebugEnabled()).thenReturn(true);
         when(log.isInfoEnabled()).thenReturn(true);
 
@@ -309,7 +309,7 @@ public class DefaultDbImportActionTest {
 
     @Test
     public void testSaveLoaded() throws Exception {
-        Log log = mock(Log.class);
+        Logger log = mock(Logger.class);
         Injector i = DIBootstrap.createInjector(new DbSyncModule(), new ToolsModule(log),
new DbImportModule());
 
         DefaultDbImportAction action = (DefaultDbImportAction) i.getInstance(DbImportAction.class);

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/load/LoadDataMapTask.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/load/LoadDataMapTask.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/load/LoadDataMapTask.java
index f0576ea..484cdc6 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/load/LoadDataMapTask.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/load/LoadDataMapTask.java
@@ -29,15 +29,15 @@ import org.apache.cayenne.modeler.util.ProjectUtil;
 import org.apache.cayenne.dbsync.reverse.configuration.ToolsModule;
 import org.apache.cayenne.dbsync.reverse.dbimport.DbImportAction;
 import org.apache.cayenne.dbsync.reverse.dbimport.DbImportModule;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @since 4.0
  */
 final public class LoadDataMapTask extends LongRunningTask {
 
-    private static Log LOGGER = LogFactory.getLog(DbLoaderContext.class);
+    private static Logger LOGGER = LoggerFactory.getLogger(DbLoaderContext.class);
 
     private DbLoaderContext context;
 

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/load/ModelerDbImportAction.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/load/ModelerDbImportAction.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/load/ModelerDbImportAction.java
index 64b33e3..c74df88 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/load/ModelerDbImportAction.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/load/ModelerDbImportAction.java
@@ -27,7 +27,7 @@ import org.apache.cayenne.map.MapLoader;
 import org.apache.cayenne.project.ProjectSaver;
 import org.apache.cayenne.dbsync.reverse.dbimport.DbImportConfiguration;
 import org.apache.cayenne.dbsync.reverse.dbimport.DefaultDbImportAction;
-import org.apache.commons.logging.Log;
+import org.slf4j.Logger;
 
 import java.io.IOException;
 
@@ -36,7 +36,7 @@ public class ModelerDbImportAction extends DefaultDbImportAction {
     @Inject
     private DataMap targetMap;
 
-    public ModelerDbImportAction(@Inject Log logger,
+    public ModelerDbImportAction(@Inject Logger logger,
                                  @Inject ProjectSaver projectSaver,
                                  @Inject DataSourceFactory dataSourceFactory,
                                  @Inject DbAdapterFactory adapterFactory,

http://git-wip-us.apache.org/repos/asf/cayenne/blob/0312b96d/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/merge/MergerOptions.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/merge/MergerOptions.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/merge/MergerOptions.java
index e486837..057cf01 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/merge/MergerOptions.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/dialog/db/merge/MergerOptions.java
@@ -54,7 +54,7 @@ import org.apache.cayenne.resource.Resource;
 import org.apache.cayenne.swing.BindingBuilder;
 import org.apache.cayenne.swing.ObjectBinding;
 import org.apache.cayenne.validation.ValidationResult;
-import org.apache.commons.logging.LogFactory;
+import org.slf4j.LoggerFactory;
 
 import javax.sql.DataSource;
 import javax.swing.JFileChooser;
@@ -173,7 +173,7 @@ public class MergerOptions extends CayenneController {
             try (Connection conn = dataSource.getConnection();) {
                 dbImport = new DbLoader(adapter, conn,
                         config,
-                        new LoggingDbLoaderDelegate(LogFactory.getLog(DbLoader.class)),
+                        new LoggingDbLoaderDelegate(LoggerFactory.getLogger(DbLoader.class)),
                         new DefaultObjectNameGenerator(NoStemStemmer.getInstance()))
                         .load();
             } catch (SQLException e) {


Mime
View raw message