1 package org.tigris.scarab.util; 2 3 48 49 import org.apache.log4j.Logger; 50 51 58 public abstract class Log 59 { 60 private static final Logger LOG = 61 Logger.getLogger("org.tigris.scarab"); 62 63 public static final Logger get() 64 { 65 return LOG; 66 } 67 68 public static final Logger get(String s) 69 { 70 return Logger.getLogger(s); 71 } 72 73 74 78 public static String debugMemory() 79 { 80 Runtime rt = Runtime.getRuntime(); 81 rt.gc(); 82 long newtotal = rt.totalMemory(); 83 long newfree = rt.freeMemory(); 84 85 String m = "MEMORY Free=" + newfree + "; Total=" + newtotal + " bytes"; 86 get().debug(m); 87 return m; 88 } 89 } 90 | Popular Tags |