@Override
protected void doWrite(SplunkEvent event) throws IOException {
Index index = getIndex();
if (index != null) {
index.submit(args, event.toString());
} else {
Receiver receiver = endpoint.getService().getReceiver();
receiver.submit(args, event.toString());
}
}