private AbstractFormatterSpec formatterSpec;
private String encoding;
private boolean autoflush;
public synchronized void start(final StartContext context) throws StartException {
final AsyncHandler handler = new AsyncHandler(queueLength);
value = handler;
formatterSpec.apply(handler);
handler.setOverflowAction(overflowAction);
handler.setAutoFlush(autoflush);
if (filter != null) handler.setFilter(filter);
try {
handler.setEncoding(encoding);
} catch (UnsupportedEncodingException e) {
throw new StartException(e);
}
Handler[] handlers = new Handler[subhandlers.size()];
for (int i = 0, subhandlersSize = subhandlers.size(); i < subhandlersSize; i++) {
handlers[i] = subhandlers.get(i).getValue();
}
handler.setHandlers(handlers);
if (level != null) handler.setLevel(level);
}