svn commit: r1819124 - in /ofbiz/ofbiz-framework/trunk: applications/order/src/main/java/org/apache/ofbiz/order/test/ applications/product/groovyScripts/catalog/category/ applications/product/groovyScripts/catalog/config/ applications/product/groovyScr...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1819124 - in /ofbiz/ofbiz-framework/trunk: applications/order/src/main/java/org/apache/ofbiz/order/test/ applications/product/groovyScripts/catalog/category/ applications/product/groovyScripts/catalog/config/ applications/product/groovyScr...

Deepak Dixit-5
Author: deepak
Date: Sat Dec 23 09:08:04 2017
New Revision: 1819124

URL: http://svn.apache.org/viewvc?rev=1819124&view=rev
Log:
Improved: Logging: change all System.out/.err/.. println to Debug.log... in the code base (OFBIZ-10045)
Thanks Michael Brohl and Kyra Pritzel-Hentley for your contribution

Modified:
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/FinAccountTest.java
    ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/category/EditCategory.groovy
    ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy
    ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy
    ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy
    ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductContent.groovy
    ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/crypto/Main.java
    ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/location/FlexibleLocation.java
    ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/HttpRequestFileUpload.java
    ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java
    ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/test/GenericMapTest.java
    ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/CommonServices.java
    ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/JavaScriptTest.js
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java
    ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java
    ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/ExampleRemoteClient.java

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/FinAccountTest.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/FinAccountTest.java?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/FinAccountTest.java (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/java/org/apache/ofbiz/order/test/FinAccountTest.java Sat Dec 23 09:08:04 2017
@@ -20,12 +20,14 @@ package org.apache.ofbiz.order.test;
 
 import java.util.Locale;
 
+import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.UtilMisc;
 import org.apache.ofbiz.entity.GenericValue;
 import org.apache.ofbiz.order.finaccount.FinAccountHelper;
 import org.apache.ofbiz.service.testtools.OFBizTestCase;
 
 public class FinAccountTest extends OFBizTestCase {
+    public static final String module = FinAccountTest.class.getName();
     public FinAccountTest(String name) {
         super(name);
     }
@@ -35,7 +37,7 @@ public class FinAccountTest extends OFBi
         GenericValue account;
 
         finAccountCode = FinAccountHelper.getNewFinAccountCode(20, delegator);
-        System.err.printf("finAccountCode=%s%n", finAccountCode);
+        Debug.logInfo("finAccountCode=%s%n", module, finAccountCode);
         assertNotNull(finAccountCode);
 
         account = FinAccountHelper.getFinAccountFromCode(finAccountCode, delegator);

Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/category/EditCategory.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/category/EditCategory.groovy?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/category/EditCategory.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/category/EditCategory.groovy Sat Dec 23 09:08:04 2017
@@ -106,7 +106,7 @@ if (fileType) {
             try {
                 file1.delete()
             } catch (Exception e) {
-                System.out.println("error deleting existing file (not neccessarily a problem)")
+                Debug.logError(e, "error deleting existing file (not neccessarily a problem)", module)
             }
             file.renameTo(file1)
         } catch (Exception e) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy Sat Dec 23 09:08:04 2017
@@ -116,7 +116,7 @@ if (fileType) {
             try {
                 file1.delete()
             } catch (Exception e) {
-                System.out.println("error deleting existing file (not neccessarily a problem)")
+                Debug.logError(e, "error deleting existing file (not neccessarily a problem)", module)
             }
             file.renameTo(file1)
         } catch (Exception e) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy Sat Dec 23 09:08:04 2017
@@ -119,7 +119,7 @@ if (fileType) {
             try {
                 file1.delete()
             } catch (Exception e) {
-                System.out.println("error deleting existing file (not neccessarily a problem)")
+                Debug.logError(e, "error deleting existing file (not neccessarily a problem)", module)
             }
             file.renameTo(file1)
         } catch (Exception e) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy Sat Dec 23 09:08:04 2017
@@ -157,7 +157,7 @@ if (fileType) {
                     }
                 }
             } catch (Exception e) {
-                System.out.println("error deleting existing file (not neccessarily a problem)")
+                Debug.logError(e, "error deleting existing file (not neccessarily a problem)", module)
             }
             file.renameTo(file1)
         } catch (Exception e) {

Modified: ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductContent.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductContent.groovy?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductContent.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/product/groovyScripts/catalog/product/EditProductContent.groovy Sat Dec 23 09:08:04 2017
@@ -136,7 +136,7 @@ if (fileType) {
                     }
                 }
             } catch (Exception e) {
-                System.out.println("error deleting existing file (not neccessarily a problem)")
+                Debug.logError(e, "error deleting existing file (not neccessarily a problem)", module)
             }
             file.renameTo(file1)
         } catch (Exception e) {

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/crypto/Main.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/crypto/Main.java?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/crypto/Main.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/crypto/Main.java Sat Dec 23 09:08:04 2017
@@ -19,20 +19,23 @@
 package org.apache.ofbiz.base.crypto;
 
 import org.apache.commons.codec.binary.Base64;
+import org.apache.ofbiz.base.util.Debug;
 import org.apache.shiro.crypto.AesCipherService;
 
 public class Main {
+    
+    public static final String module = Main.class.getName();
     public static void main(String[] args) throws Exception {
         if ("-crypt".equals(args[0])) {
-            System.out.println(HashCrypt.cryptUTF8(args[1], null, args[2]));
+            Debug.logInfo(HashCrypt.cryptUTF8(args[1], null, args[2]), module);
         } else if ("-digest".equals(args[0])) {
             String digest = HashCrypt.digestHash("SHA", null, args[1]);
-            System.out.println(digest);
+            Debug.logInfo(digest, module);
         } else if ("-kek".equals(args[0])) {
             AesCipherService cs = new AesCipherService();
-            System.out.println(Base64.encodeBase64String(cs.generateNewKey().getEncoded()));
+            Debug.logInfo(Base64.encodeBase64String(cs.generateNewKey().getEncoded()), module);
         } else if ("-kek-old".equals(args[0])) {
-            System.out.println(Base64.encodeBase64String(DesCrypt.generateKey().getEncoded()));
+            Debug.logInfo(Base64.encodeBase64String(DesCrypt.generateKey().getEncoded()), module);
         }
     }
 }

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/location/FlexibleLocation.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/location/FlexibleLocation.java?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/location/FlexibleLocation.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/location/FlexibleLocation.java Sat Dec 23 09:08:04 2017
@@ -26,6 +26,7 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
 
+import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.UtilProperties;
 import org.apache.ofbiz.base.util.UtilValidate;
 
@@ -35,6 +36,7 @@ import org.apache.ofbiz.base.util.UtilVa
  */
 public final class FlexibleLocation {
 
+    public static final String module = FlexibleLocation.class.getName();
     private static final Map<String, LocationResolver> locationResolvers;
 
     static {
@@ -64,7 +66,7 @@ public final class FlexibleLocation {
                 }
             }
         } catch (Throwable e) {
-            System.out.println("Exception thrown while loading locationresolvers.properties: " + e);
+            Debug.logError(e, "Exception thrown while loading locationresolvers.properties", module);
         }
         locationResolvers = Collections.unmodifiableMap(resolverMap);
     }

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/HttpRequestFileUpload.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/HttpRequestFileUpload.java?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/HttpRequestFileUpload.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/HttpRequestFileUpload.java Sat Dec 23 09:08:04 2017
@@ -117,7 +117,7 @@ public class HttpRequestFileUpload {
 
         String reqLengthString = request.getHeader("content-length");
 
-        System.out.println("expect " + reqLengthString + " bytes.");
+        Debug.logInfo("expect " + reqLengthString + " bytes.", module);
         int requestLength = 0;
 
         try {
@@ -139,7 +139,7 @@ public class HttpRequestFileUpload {
 
         String boundary = new String(line, 0, boundaryLength, UtilIO.getUtf8()); // -2 discards the newline character
 
-        System.out.println("boundary=[" + boundary + "] length is " + boundaryLength);
+        Debug.logInfo("boundary=[" + boundary + "] length is " + boundaryLength, module);
         fields = new HashMap<>();
 
         while (requestLength > 0/* i != -1*/) {
@@ -178,7 +178,7 @@ public class HttpRequestFileUpload {
                         lastTwoBytes[0] = line[i - 2];
                         lastTwoBytes[1] = line[i - 1];
                     }
-                    System.out.println("about to create a file:" + (savePath == null ? "" : savePath) + filenameToUse);
+                    Debug.logInfo("about to create a file:" + (savePath == null ? "" : savePath) + filenameToUse, module);
                     // before creating the file make sure directory exists
                     if (savePath == null) {
                         throw new IllegalArgumentException("savePath is null");
@@ -282,10 +282,10 @@ public class HttpRequestFileUpload {
         int i = -1;
 
         while (((i = in.readLine(buf, off, len)) == -1) && (reqLen > 0)) {
-            System.out.print("waiting");
+            Debug.logInfo("waiting", module);
             if (waitCount > MAX_WAITS) {
-                System.out.println("waited " + waitCount + " times, bailing out while still expecting " +
-                    reqLen + " bytes.");
+                Debug.logInfo("waited " + waitCount + " times, bailing out while still expecting " +
+                    reqLen + " bytes.", module);
                 throw new IOException("waited " + waitCount + " times, bailing out while still expecting " +
                         reqLen + " bytes.");
             }
@@ -296,10 +296,10 @@ public class HttpRequestFileUpload {
                 try {
                     wait(WAIT_INTERVAL);
                 } catch (Exception e3) {
-                    System.out.print(".");
+                    Debug.logInfo(".", module);
                 }
             }
-            System.out.println((new Date().getTime() - endMS) + " ms");
+            Debug.logInfo((new Date().getTime() - endMS) + " ms", module);
         }
         return i;
     }

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java Sat Dec 23 09:08:04 2017
@@ -316,7 +316,7 @@ public final class UtilProperties implem
                 try {
                     inStream.close();
                 } catch (IOException e) {
-                    System.out.println("Exception thrown while closing InputStream: " + e);
+                    Debug.logError(e, "Exception thrown while closing InputStream", module);
                 }
             }
         }

Modified: ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/test/GenericMapTest.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/test/GenericMapTest.java?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/test/GenericMapTest.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/test/GenericMapTest.java Sat Dec 23 09:08:04 2017
@@ -25,11 +25,15 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.ofbiz.base.test.GenericTestCaseBase;
+import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.base.util.collections.GenericMap;
 import org.apache.ofbiz.base.util.collections.GenericMapEntry;
 import org.apache.ofbiz.base.util.collections.IteratorWrapper;
 
 public class GenericMapTest extends GenericTestCaseBase {
+
+    public static final String module = GenericMapTest.class.getName();
+
     @SuppressWarnings("serial")
     public static class TestGenericMap<K, V> extends GenericMap<K, V> {
         private static final String[] countNames = {
@@ -147,24 +151,24 @@ public class GenericMapTest extends Gene
 
     public void testFoo() throws Exception {
         TestGenericMap<String, Integer> map = new TestGenericMap<String, Integer>();
-        map.put("a", 0); System.err.println("put a\t\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount());
+        map.put("a", 0); Debug.logInfo("put a\t\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount(), module);
         assertEquals("get a", Integer.valueOf(0), map.get("a"));
-        map.put("b", 1); System.err.println("put b\t\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount());
+        map.put("b", 1); Debug.logInfo("put b\t\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount(), module);
         assertEquals("get b", Integer.valueOf(1), map.get("b"));
-        map.put("c", 2); System.err.println("put c\t\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount());
+        map.put("c", 2); Debug.logInfo("put c\t\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount(), module);
         assertEquals("get c", Integer.valueOf(2), map.get("c"));
-        map.put("d", 3); System.err.println("put d\t\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount());
+        map.put("d", 3); Debug.logInfo("put d\t\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount(), module);
         assertEquals("get d", Integer.valueOf(3), map.get("d"));
-        map.put("c", 22); System.err.println("put c-2\t\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount());
+        map.put("c", 22); Debug.logInfo("put c-2\t\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount(), module);
         assertEquals("get c-2", Integer.valueOf(22), map.get("c"));
-        map.remove("b"); System.err.println("remove b\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount());
+        map.remove("b"); Debug.logInfo("remove b\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount(), module);
         assertNull("null b", map.get("b"));
-        map.remove("aaa"); System.err.println("remove aaa\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount());
-        System.err.println("map=" + map);
-        System.err.println("counts=" + map.getCounts() + ", modCount=" + map.getModCount());
+        map.remove("aaa"); Debug.logInfo("remove aaa\tcounts=" + map.getCounts() + ", modCount=" + map.getModCount(), module);
+        Debug.logInfo("map=" + map, module);
+        Debug.logInfo("counts=" + map.getCounts() + ", modCount=" + map.getModCount(), module);
         // this seems to call size()
         new HashMap<String, Integer>(map);
-        System.err.println("counts=" + map.getCounts() + ", modCount=" + map.getModCount());
+        Debug.logInfo("counts=" + map.getCounts() + ", modCount=" + map.getModCount(), module);
     }
 
 }

Modified: ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/CommonServices.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/CommonServices.java?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/CommonServices.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/CommonServices.java Sat Dec 23 09:08:04 2017
@@ -87,17 +87,17 @@ public class CommonServices {
                 Object cKey = entry.getKey();
                 Object value = entry.getValue();
 
-                System.out.println("---- SVC-CONTEXT: " + cKey + " => " + value);
+                Debug.logInfo("---- SVC-CONTEXT: " + cKey + " => " + value, module);
             }
         }
         if (!context.containsKey("message")) {
             response.put("resp", "no message found");
         } else {
-            System.out.println("-----SERVICE TEST----- : " + (String) context.get("message"));
+            Debug.logInfo("-----SERVICE TEST----- : " + (String) context.get("message"), module);
             response.put("resp", "service done");
         }
 
-        System.out.println("----- SVC: " + dctx.getName() + " -----");
+        Debug.logInfo("----- SVC: " + dctx.getName() + " -----", module);
         return response;
     }
 
@@ -128,7 +128,7 @@ public class CommonServices {
         if (duration == null) {
             duration = 30000l;
         }
-        System.out.println("-----SERVICE BLOCKING----- : " + duration/1000d +" seconds");
+        Debug.logInfo("-----SERVICE BLOCKING----- : " + duration/1000d +" seconds", module);
         try {
             Thread.sleep(duration);
         } catch (InterruptedException e) {

Modified: ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/JavaScriptTest.js
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/JavaScriptTest.js?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/JavaScriptTest.js (original)
+++ ofbiz/ofbiz-framework/trunk/framework/common/src/main/java/org/apache/ofbiz/common/JavaScriptTest.js Sat Dec 23 09:08:04 2017
@@ -24,4 +24,4 @@ m = bsf.lookupBean("response");
 m.put("result", x);
 
 bsf.registerBean("response", m);
-java.lang.System.out.println("BSF - JS: " + x);
+console.log("BSF - JS: " + x);

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java Sat Dec 23 09:08:04 2017
@@ -23,9 +23,14 @@ import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.Statement;
 
+import org.apache.ofbiz.base.util.Debug;
+
+import com.healthmarketscience.jackcess.util.CustomLinkResolver;
+
 
 public class CursorConnection extends AbstractCursorHandler {
 
+    public static final String module = CursorConnection.class.getName();
     public static Connection newCursorConnection(Connection con, String cursorName, int pageSize) throws Exception {
         return newHandler(new CursorConnection(con, cursorName, pageSize), Connection.class);
     }
@@ -39,12 +44,12 @@ public class CursorConnection extends Ab
 
     public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
         if ("prepareStatement".equals(method.getName())) {
-            System.err.println("prepareStatement");
+            Debug.logInfo("prepareStatement", module);
             args[0] = "DECLARE " + cursorName + " CURSOR FOR " + args[0];
             PreparedStatement pstmt = (PreparedStatement) method.invoke(con, args);
             return CursorStatement.newCursorPreparedStatement(pstmt, cursorName, fetchSize);
         } else if ("createStatement".equals(method.getName())) {
-            System.err.println("createStatement");
+            Debug.logInfo("createStatement", module);
             Statement stmt = (Statement) method.invoke(con, args);
             return CursorStatement.newCursorStatement(stmt, cursorName, fetchSize);
         }

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java Sat Dec 23 09:08:04 2017
@@ -23,9 +23,12 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 
+import org.apache.ofbiz.base.util.Debug;
+
 
 public class CursorResultSet extends AbstractCursorHandler {
 
+    public static final String module = CursorResultSet.class.getName();
     protected ResultSet rs;
     protected Statement stmt;
     protected String query;
@@ -34,7 +37,7 @@ public class CursorResultSet extends Abs
         super(cursorName, fetchSize);
         this.stmt = stmt;
         query = "FETCH FORWARD " + fetchSize + " IN " + cursorName;
-        System.err.println("executing page fetch(1)");
+        Debug.logInfo("executing page fetch(1)", module);
         rs = stmt.executeQuery(query);
     }
 
@@ -50,7 +53,7 @@ public class CursorResultSet extends Abs
 
     protected boolean next() throws SQLException {
         if (rs.next()) return true;
-        System.err.println("executing page fetch(2)");
+        Debug.logInfo("executing page fetch(2)", module);
         rs = stmt.executeQuery(query);
         return rs.next();
     }

Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java Sat Dec 23 09:08:04 2017
@@ -24,12 +24,14 @@ import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
 
+import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.entity.transaction.GenericTransactionException;
 import org.apache.ofbiz.entity.transaction.TransactionUtil;
 
 
 public class CursorStatement extends AbstractCursorHandler {
 
+    public static final String module = CursorStatement.class.getName();
     protected ResultSet currentResultSet;
     protected Statement stmt;
     protected boolean beganTransaction;
@@ -41,7 +43,7 @@ public class CursorStatement extends Abs
         beganTransaction = TransactionUtil.begin();
         autoCommit = stmt.getConnection().getAutoCommit();
         stmt.getConnection().setAutoCommit(false);
-        System.err.println("beganTransaction=" + beganTransaction + ", autoCommit=" + autoCommit);
+        Debug.logInfo("beganTransaction=" + beganTransaction + ", autoCommit=" + autoCommit, module);
     }
 
     public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
@@ -58,7 +60,7 @@ public class CursorStatement extends Abs
             return currentResultSet;
         } else if ("executeQuery".equals(method.getName()) && args != null) {
             args[0] = "DECLARE " + cursorName + " CURSOR FOR " + args[0];
-            System.err.println("query=" + args[0]);
+            Debug.logInfo("query=" + args[0], module);
             if (stmt.execute((String) args[0])) {
                 throw new SQLException("DECLARE returned a ResultSet");
             }

Modified: ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/ExampleRemoteClient.java
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/ExampleRemoteClient.java?rev=1819124&r1=1819123&r2=1819124&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/ExampleRemoteClient.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/service/src/main/java/org/apache/ofbiz/service/rmi/ExampleRemoteClient.java Sat Dec 23 09:08:04 2017
@@ -25,6 +25,7 @@ import java.rmi.RemoteException;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.ofbiz.base.util.Debug;
 import org.apache.ofbiz.service.GenericServiceException;
 
 /** An example of how to remotely access the Service Engine's RemoteDispatcher.
@@ -47,6 +48,7 @@ import org.apache.ofbiz.service.GenericS
  */
 public class ExampleRemoteClient {
 
+    public static final String module = ExampleRemoteClient.class.getName();
     protected final static String RMI_URL = "rmi://localhost:1099/RMIDispatcher"; // change to match the remote server
     protected RemoteDispatcher rd = null;
 
@@ -71,6 +73,6 @@ public class ExampleRemoteClient {
     public static void main(String[] args) throws Exception {
         ExampleRemoteClient rm = new ExampleRemoteClient();
         Map<String, Object> result = rm.runTestService();
-        System.out.println("Service Result Map: " + result);
+        Debug.logInfo("Service Result Map: " + result, module);
     }
 }