1 22 package com.scalagent.ksoap; 23 24 25 28 public class KSoapTracing { 29 public static int ERROR = 1; 30 public static int WARN = 2; 31 public static int INFO = 3; 32 public static int DEBUG = 4; 33 34 public static int traceLevel = 1; 35 public static boolean dbg = false; 36 public static boolean dbgReader = false; 37 public static boolean dbgWriter = false; 38 39 static { 40 String l = System.getProperty("traceLevel"); 41 if (l != null && l != "") { 42 traceLevel = Integer.parseInt(l); 43 } 44 if (System.getProperty("dbg") != null) 45 dbg = true; 46 if (System.getProperty("dbgReader") != null) 47 dbgReader = true; 48 if (System.getProperty("dbgWriter") != null) 49 dbgWriter = true; 50 } 51 52 public static void log(int level, String trace) { 53 if (level <= traceLevel) 54 System.out.println(trace); 55 } 56 } 57 | Popular Tags |