StringBuilder newMessage = new StringBuilder(256);
Thread current = Thread.currentThread();
newMessage.append(orig).append(" (in thread '");
newMessage.append(current.getName()).append("'");
if (current instanceof SinkHandlerLogThread) {
SinkHandlerLogThread tt = (SinkHandlerLogThread)current;
if(tt.getCurrentProcessorName().length()>0) {
newMessage.append("; in processor '");
newMessage.append(tt.getCurrentProcessorName());
newMessage.append("'");
}
}
newMessage.append(")");
record.setMessage(newMessage.toString());