package org.springblade.common.upyzt.net;

public abstract class Logger {

    protected abstract void beforeRequest(UpyztRequest request);

    protected abstract UpyztResponse afterResponse(UpyztRequest request, UpyztResponse response, long elapsedTime);

    protected static class NoOpLogger extends Logger {

        @Override
        public void beforeRequest(UpyztRequest request) {
            // no operation
        }

        @Override
        public UpyztResponse afterResponse(UpyztRequest request, UpyztResponse response, long elapsedTime) {
            return response;
        }
    }
}
