예제 #1
0
 /** Print message with exception stack trace */
 protected void print(String msg, Throwable e) {
   StringBuffer sb = new StringBuffer();
   sb.append(getName());
   sb.append(": ");
   sb.append(msg);
   sb.append("\n");
   if (e != null) {
     sb.append(StringUtil.stackTraceString(e));
   }
   System.out.print(sb.toString());
 }
예제 #2
0
 /** Return agent name for messages. Default is to return java instance name. */
 protected String getName() {
   return StringUtil.shortName(this);
 }