From fb77a3c4770cb529d3c5e65ab7bbca46f457f0cd Mon Sep 17 00:00:00 2001 From: Deepak Dixit Date: Sat, 23 Dec 2017 09:08:04 +0000 Subject: [PATCH] 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 git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1819124 13f79535-47bb-0310-9956-ffa450edef68 --- .../ofbiz/order/test/FinAccountTest.java | 4 +++- .../catalog/category/EditCategory.groovy | 2 +- .../EditProductConfigItemContent.groovy | 2 +- .../imagemanagement/ImageUpload.groovy | 2 +- .../imagemanagement/SetDefaultImage.groovy | 2 +- .../catalog/product/EditProductContent.groovy | 2 +- .../org/apache/ofbiz/base/crypto/Main.java | 11 +++++---- .../ofbiz/base/location/FlexibleLocation.java | 4 +++- .../base/util/HttpRequestFileUpload.java | 16 ++++++------- .../ofbiz/base/util/UtilProperties.java | 2 +- .../util/collections/test/GenericMapTest.java | 24 +++++++++++-------- .../apache/ofbiz/common/CommonServices.java | 8 +++---- .../org/apache/ofbiz/common/JavaScriptTest.js | 2 +- .../ofbiz/entity/jdbc/CursorConnection.java | 9 +++++-- .../ofbiz/entity/jdbc/CursorResultSet.java | 7 ++++-- .../ofbiz/entity/jdbc/CursorStatement.java | 6 +++-- .../service/rmi/ExampleRemoteClient.java | 4 +++- 17 files changed, 65 insertions(+), 42 deletions(-) diff --git a/applications/order/src/main/java/org/apache/ofbiz/order/test/FinAccountTest.java b/applications/order/src/main/java/org/apache/ofbiz/order/test/FinAccountTest.java index 0010acc254..c61d0bcf78 100644 --- a/applications/order/src/main/java/org/apache/ofbiz/order/test/FinAccountTest.java +++ b/applications/order/src/main/java/org/apache/ofbiz/order/test/FinAccountTest.java @@ -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 OFBizTestCase { 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); diff --git a/applications/product/groovyScripts/catalog/category/EditCategory.groovy b/applications/product/groovyScripts/catalog/category/EditCategory.groovy index 6d0e6e7caf..7d8edd0665 100644 --- a/applications/product/groovyScripts/catalog/category/EditCategory.groovy +++ b/applications/product/groovyScripts/catalog/category/EditCategory.groovy @@ -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) { diff --git a/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy b/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy index 81916050e2..f2f9a02d19 100644 --- a/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy +++ b/applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy @@ -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) { diff --git a/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy b/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy index 608ae068bf..6a348fd85e 100644 --- a/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy +++ b/applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy @@ -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) { diff --git a/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy b/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy index b825b0741c..85fda414d0 100644 --- a/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy +++ b/applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy @@ -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) { diff --git a/applications/product/groovyScripts/catalog/product/EditProductContent.groovy b/applications/product/groovyScripts/catalog/product/EditProductContent.groovy index 176ff23a59..8c3873e59f 100644 --- a/applications/product/groovyScripts/catalog/product/EditProductContent.groovy +++ b/applications/product/groovyScripts/catalog/product/EditProductContent.groovy @@ -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) { diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/crypto/Main.java b/framework/base/src/main/java/org/apache/ofbiz/base/crypto/Main.java index 6b06348dd9..4204c438e8 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/crypto/Main.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/crypto/Main.java @@ -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); } } } diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/location/FlexibleLocation.java b/framework/base/src/main/java/org/apache/ofbiz/base/location/FlexibleLocation.java index f6a35f6e99..d3b55401c6 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/location/FlexibleLocation.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/location/FlexibleLocation.java @@ -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.UtilValidate; */ public final class FlexibleLocation { + public static final String module = FlexibleLocation.class.getName(); private static final Map 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); } diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/HttpRequestFileUpload.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/HttpRequestFileUpload.java index 9af96d06da..95fc1c3747 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/util/HttpRequestFileUpload.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/HttpRequestFileUpload.java @@ -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; } diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java index 36fe056c8b..b4953802ec 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilProperties.java @@ -316,7 +316,7 @@ public final class UtilProperties implements Serializable { try { inStream.close(); } catch (IOException e) { - System.out.println("Exception thrown while closing InputStream: " + e); + Debug.logError(e, "Exception thrown while closing InputStream", module); } } } diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/test/GenericMapTest.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/test/GenericMapTest.java index a0974e8d91..1285e544e5 100644 --- a/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/test/GenericMapTest.java +++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/collections/test/GenericMapTest.java @@ -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 extends GenericMap { private static final String[] countNames = { @@ -147,24 +151,24 @@ public class GenericMapTest extends GenericTestCaseBase { public void testFoo() throws Exception { TestGenericMap map = new TestGenericMap(); - 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(map); - System.err.println("counts=" + map.getCounts() + ", modCount=" + map.getModCount()); + Debug.logInfo("counts=" + map.getCounts() + ", modCount=" + map.getModCount(), module); } } diff --git a/framework/common/src/main/java/org/apache/ofbiz/common/CommonServices.java b/framework/common/src/main/java/org/apache/ofbiz/common/CommonServices.java index 1d040006ff..861ddd0bee 100644 --- a/framework/common/src/main/java/org/apache/ofbiz/common/CommonServices.java +++ b/framework/common/src/main/java/org/apache/ofbiz/common/CommonServices.java @@ -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) { diff --git a/framework/common/src/main/java/org/apache/ofbiz/common/JavaScriptTest.js b/framework/common/src/main/java/org/apache/ofbiz/common/JavaScriptTest.js index ba290360f5..0d00113725 100644 --- a/framework/common/src/main/java/org/apache/ofbiz/common/JavaScriptTest.js +++ b/framework/common/src/main/java/org/apache/ofbiz/common/JavaScriptTest.js @@ -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); diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java index db3c191e02..181d4ad227 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorConnection.java @@ -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 AbstractCursorHandler { 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); } diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java index 3f313764d8..29e3f4bedf 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorResultSet.java @@ -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 AbstractCursorHandler { 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 AbstractCursorHandler { 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(); } diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java index 174690dc9a..c5322f257b 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/CursorStatement.java @@ -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 AbstractCursorHandler { 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 AbstractCursorHandler { 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"); } diff --git a/framework/service/src/main/java/org/apache/ofbiz/service/rmi/ExampleRemoteClient.java b/framework/service/src/main/java/org/apache/ofbiz/service/rmi/ExampleRemoteClient.java index e4e298e22b..2b60c1123e 100644 --- a/framework/service/src/main/java/org/apache/ofbiz/service/rmi/ExampleRemoteClient.java +++ b/framework/service/src/main/java/org/apache/ofbiz/service/rmi/ExampleRemoteClient.java @@ -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.GenericServiceException; */ 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 result = rm.runTestService(); - System.out.println("Service Result Map: " + result); + Debug.logInfo("Service Result Map: " + result, module); } }