// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import org.apache.log4j.*;

public class TestLog4j {
    private final static int N = 100000;
    public static void main(String[] args) {
        PropertyConfigurator.configure("C:\\log4j.properties");
        Logger logger = Logger.getLogger("TestLog4j");
        long t1 = System.currentTimeMillis();
        for(int i = 0; i < N; i++) {
            logger.info("This is test");
        }
        long t2 = System.currentTimeMillis();
        System.out.println("log4j: " + (t2 - t1));
    }
}
