diff src/org/tn5250j/framework/tn5250/WTDSFParser.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/WTDSFParser.java	Tue Jun 03 11:44:37 2014 -0700
+++ b/src/org/tn5250j/framework/tn5250/WTDSFParser.java	Tue Jun 03 12:10:21 2014 -0700
@@ -40,8 +40,8 @@
 import java.util.List;
 
 import org.tn5250j.encoding.ICodePage;
-import org.tn5250j.tools.logging.TN5250jLogFactory;
-import org.tn5250j.tools.logging.TN5250jLogger;
+import android.util.Log;
+
 
 /**
  *
@@ -62,7 +62,7 @@
    boolean error;
    boolean guiStructsExist;
 
-   private TN5250jLogger log = TN5250jLogFactory.getLogger(this.getClass());
+
 
    private final List<Window> guiStructs = new ArrayList<Window>(3);
    private final List<ChoiceField> choices = new ArrayList<ChoiceField>(3);
@@ -103,7 +103,7 @@
 
       Window(byte[] seg, int pos) {
 
-         //log.info("window created at " + pos);
+         //Log.i(TAG,"window created at " + pos);
          window = seg;
          this.pos = pos;
          guiStructsExist = true;
@@ -361,7 +361,7 @@
 
                                  }
 
-                                 log.debug(
+                                 Log.d(TAG,
                                     " orientation " + Integer.toBinaryString(orientation) +
                                     " mAttr " + mAttr +
                                     " cAttr " + cAttr +
@@ -375,7 +375,7 @@
                                                             hfBuffer);
                                  break;
                               default:
-                            	  log.warn("Invalid Window minor structure");
+                            	  Log.w(TAG,"Invalid Window minor structure");
                               length = 0;
                               done = true;
                            }
@@ -431,7 +431,7 @@
                         break;
 
                      case 0x5F:      // Remove All GUI Constructs
-                        log.info("remove all gui contructs");
+                        Log.i(TAG,"remove all gui contructs");
                         clearGuiStructs();
                         guiStructsExist = false;
                         int len = 4;
@@ -453,7 +453,7 @@
                         done = true;
                         break;
                      case 0x59:	// remove gui window
-                        log.info(" remove window at " + screen52.getCurrentPos());
+                        Log.i(TAG," remove window at " + screen52.getCurrentPos());
                         done = true;
                         break;
 
@@ -758,7 +758,7 @@
          int cnt = 0;
          int minLen = 0;
          majLen -= 21;
-         log.debug(" row: " + screen52.getCurrentRow()
+         Log.d(TAG," row: " + screen52.getCurrentRow()
                               + " col: " + screen52.getCurrentCol()
                               + " type " + typeSelection
                               + " gui " + guiDevice
@@ -839,14 +839,14 @@
 
                   // is in selected state
                   if ((flagCT1 & 0x40) == 0x40) {
-                	  log.debug(" selected ");
+                	  Log.d(TAG," selected ");
                      selected = true;
                   }
 
                   //System.out.println(Integer.toBinaryString((flagCT1 & 0xf0)));
                   // is mnemonic offset specified
                   if ((flagCT1 & 0x08) == 8) {
-                	 log.debug(" mnemOffset " + mnemOffset);
+                	 Log.d(TAG," mnemOffset " + mnemOffset);
                      mnemOffset = segment[pos++];
                      cnt++;
                   }
@@ -855,20 +855,20 @@
                   if ((flagCT1 & 0x04) == 4) {
 
                      aid = true;
-                     log.debug(" aidKey " + aid);
+                     Log.d(TAG," aidKey " + aid);
 //                     cnt++;
                   }
 
                   // is single digit number specified
                   if ((flagCT1 & 0x01) == 0x01) {
-                	 log.debug(" single digit " );
+                	 Log.d(TAG," single digit " );
                      pos++;
                      cnt++;
                   }
 
                   // is double digint number specified
                   if ((flagCT1 & 0x02) == 0x02) {
-                	 log.debug(" double digit " );
+                	 Log.d(TAG," double digit " );
 
                      pos++;
                      cnt++;
@@ -902,7 +902,7 @@
 
 //         screen52.getScreenFields().getCurrentField().setMDT();
 
-                  log.debug(s + " selected " + selected);
+                  Log.d(TAG,s + " selected " + selected);
 //                  chcRowStart;
                   //maxColChoice
                   colCtr++;
@@ -938,7 +938,7 @@
          }  while (majLen > 0);
       }
       catch (Exception exc) {
-    	 log.warn(" defineSelectionField :", exc);
+    	 Log.w(TAG," defineSelectionField :", exc);
          exc.printStackTrace();
       }
    }