1 23 24 25 28 29 package com.sun.enterprise.tools.common.util; 30 31 import com.sun.enterprise.tools.common.util.diagnostics.Reporter; 32 33 public class ViewLogInterval { 34 35 private static int INTERVAL=8000; 36 private static int minInterval = 1000; 37 38 public static void setLogInterval(int val){ 39 setLogInterval(""+val); } 41 42 public static void setLogInterval(String val){ 43 Reporter.info(""); if ( (val == null) || val.length() <=0) 45 return; 46 try { 47 int ret = Integer.parseInt(val); 48 if (ret < 0) 49 return; 50 INTERVAL = (ret < minInterval)? minInterval : ret; 51 Reporter.info("setLogInterval(): " + INTERVAL); }catch (NumberFormatException e){} 53 } 54 55 56 public static int getLogInterval(){ 57 return INTERVAL; 58 } 59 60 } 61 | Popular Tags |