geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r411395 - in /geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell: InteractiveShell.java console/InteractiveConsole.java
Date Sat, 03 Jun 2006 07:07:00 GMT
Author: jdillon
Date: Sat Jun  3 00:07:00 2006
New Revision: 411395

URL: http://svn.apache.org/viewvc?rev=411395&view=rev
Log:
Added debug to dump inputed line as hex, trying to hunt down corruption problem using telnet

Modified:
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/InteractiveShell.java
    geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/InteractiveConsole.java

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/InteractiveShell.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/InteractiveShell.java?rev=411395&r1=411394&r2=411395&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/InteractiveShell.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/InteractiveShell.java
Sat Jun  3 00:07:00 2006
@@ -18,6 +18,8 @@
 
 import org.apache.geronimo.gshell.console.InteractiveConsole;
 import org.apache.geronimo.gshell.console.Console;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import java.io.IOException;
 
@@ -29,6 +31,8 @@
 public class InteractiveShell
     extends InteractiveConsole
 {
+    private static final Log log = LogFactory.getLog(InteractiveConsole.class);
+
     //
     // TODO: Refactor InteractiveConsole to use method overides for extention
     //       Seems like that is what we are doing so far anyways (sub-classing that is)

Modified: geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/InteractiveConsole.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/InteractiveConsole.java?rev=411395&r1=411394&r2=411395&view=diff
==============================================================================
--- geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/InteractiveConsole.java
(original)
+++ geronimo/sandbox/gshell/trunk/gshell-core/src/main/java/org/apache/geronimo/gshell/console/InteractiveConsole.java
Sat Jun  3 00:07:00 2006
@@ -112,6 +112,21 @@
         while ((line = console.readLine(prompter.getPrompt())) != null) {
             if (debug) {
                 log.debug("Read line: " + line);
+
+                // Log the line as hex
+                StringBuffer idx = new StringBuffer();
+                StringBuffer hex = new StringBuffer();
+
+                byte[] bytes = line.getBytes();
+                for (byte b : bytes) {
+                    String h = Integer.toHexString(b);
+
+                    hex.append("x").append(h).append(" ");
+                    idx.append(" ").append((char)b).append("  ");
+                }
+
+                log.debug("HEX: " + hex);
+                log.debug("     "  + idx);
             }
 
             Executor.Result result = executor.execute(line);



Mime
View raw message