@Override
    protected void doApply(ApiRequest request, IPolicyContext context, LogHeadersConfigBean config,
            IPolicyChain<ApiRequest> chain) {
        IApimanLogger logger = context.getLogger(getClass());
        String endpoint = request.getApi().getEndpoint();
        context.setAttribute(ENDPOINT_ATTRIBUTE, endpoint);
        if (config.isLogHeaders() && config.getDirection() != LogHeadersDirectionType.response) {
            logHeaders(logger, request.getHeaders(), HttpDirection.REQUEST, endpoint);
        }
        chain.doApply(request);
    }
@see io.apiman.gateway.engine.policies.AbstractMappedPolicy#doApply(io.apiman.gateway.engine.beans.ApiRequest, io.apiman.gateway.engine.policy.IPolicyContext, java.lang.Object, io.apiman.gateway.engine.policy.IPolicyChain)
plugins/log-policy/src/main/java/io/apiman/plugins/log_policy/LogHeadersPolicy.java