private void log(final Severity severity, final String message, final Exception e) {
        errorReceiverProxy.log(severity, locationFactory.create(locator), getElementId(), message, e);
        switch (severity) {
            case FATAL_ERROR:
                LOGGER.error(message, e);
                break;
            case ERROR:
                LOGGER.error(message, e);
                break;
            case WARNING:
                LOGGER.warn(message, e);
                break;
            case INFO:
                LOGGER.info(message, e);
                break;
            default:
                throw new RuntimeException("Unknown severity " + severity);
        }
    }
Sets the locator to use when reporting errors.

@param locator The locator to use.
stroom-annotation/stroom-annotation-pipeline/src/main/java/stroom/annotation/pipeline/AnnotationWriter.java