diff src/org/tn5250j/framework/tn5250/KeyStrokenizer.java @ 25:5949eb469a79 tn5250

adding tn5250 files, native android logging
author Carl Byington <carl@five-ten-sg.com>
date Tue, 03 Jun 2014 12:10:21 -0700
parents e8d2a24e85c6
children b29b39f386a4
line wrap: on
line diff
--- a/src/org/tn5250j/framework/tn5250/KeyStrokenizer.java	Tue Jun 03 11:44:37 2014 -0700
+++ b/src/org/tn5250j/framework/tn5250/KeyStrokenizer.java	Tue Jun 03 12:10:21 2014 -0700
@@ -21,8 +21,8 @@
 
 package org.tn5250j.framework.tn5250;
 
-import org.tn5250j.tools.logging.TN5250jLogFactory;
-import org.tn5250j.tools.logging.TN5250jLogger;
+import android.util.Log;
+
 
 
 public class KeyStrokenizer {
@@ -32,7 +32,7 @@
    private int index;
    private int length;
 	
-   private final TN5250jLogger log = TN5250jLogFactory.getLogger(this.getClass());
+
    
    public KeyStrokenizer() {
 
@@ -44,7 +44,7 @@
 
       if (strokes != null) {
          keyStrokes.setLength(0);
-		 log.debug("set "+ keyStrokes);
+		 Log.d(TAG,"set "+ keyStrokes);
          length = strokes.length();
       }
       else {
@@ -77,7 +77,7 @@
 
                // we need to throw an error here
                if(index >= length) {
-                  log.warn(" mnemonic key was incomplete :1 " +
+                  Log.w(TAG," mnemonic key was incomplete :1 " +
                                        "at position " + index + " len " + length );
                }
                else {
@@ -99,7 +99,7 @@
                            // we need to throw an error here because we did not
                            //   find an ending for the potential mnemonic
                            if(index >= length) {
-                              log.warn(
+                              Log.w(TAG,
                               " mnemonic key was incomplete ending not found :2 " +
                                           "at position " + index);
                            }
@@ -113,7 +113,7 @@
             case ']':
                index++;
                if(index >= length) {
-                  log.warn(
+                  Log.w(TAG,
                   " mnemonic key was incomplete ending not found :3 " +
                               "at position " + index);
                   sb.append(c);
@@ -127,7 +127,7 @@
                      index++;
                   }
                   else {
-                     log.warn(
+                     Log.w(TAG,
                      " mnemonic key was incomplete beginning not found :4 " +
                                  "at position " + index);
                   }
@@ -143,7 +143,7 @@
          }
 
       }
-	  log.debug("next "+ keyStrokes);
+	  Log.d(TAG,"next "+ keyStrokes);
 
       return s;
    }