public void diagnostic(String message, final Throwable e) {
final String msg = format(toPrefix("gwt-log"), message);
DeferredCommand.addCommand(new Command() {
public void execute() {
for (Iterator iterator = loggers.iterator(); iterator.hasNext();) {
Logger logger = (Logger) iterator.next();
try {
logger.diagnostic(msg, e);
} catch (RuntimeException e1) {
iterator.remove();
diagnostic("Removing '" + GWT.getTypeName(logger) + "' due to unexecpted exception", e1);
}
}