Formatter formatter = null;
try {
formatter = (Formatter)Class.forName(formatterClassName).newInstance();
}
catch (Throwable t) {
formatter = new BasicFormatter();
}
if ((formatter instanceof BasicFormatter) && (formatterFormat != null)) {
((BasicFormatter)formatter).applyFormat(formatterFormat);
}
h.setFormatter(formatter);