import java.net.InetAddress;
import java.text.SimpleDateFormat;
+// FEATURE: logging exceptions should automatically unwrap exceptions
+
/** Easy to use logger.
*
* @author adam@ibex.org
}
public static void clearnotes() { if (!notes) return; notebuf().setLength(0); }
- private static final Basket.Map notebufs = new Basket.HashMap();
+ private static final Basket.Map notebufs = new Basket.Hash();
public static StringBuffer notebuf() {
StringBuffer ret = (StringBuffer)notebufs.get(Thread.currentThread());
if (ret == null) {
String shortened = s.substring(s.indexOf('(')+1);
shortened = shortened.substring(0, shortened.indexOf(')'));
m += " " + shortened;
- if (ok > 1) m = m.substring(0, 78);
+ if (ok > 1) m = m.substring(0, Math.min(m.length(), 78));
ok++;
}
} while (m.length() < 78);