I'm decided to use slf4j instead of Java's very own logging. I've successfully logging to console using slf4j. But I don't know how to write it into a log file. Log file will help us to collect possible errors along the runtime.
I'm implementing slf4j by doing this,
private static final org.slf4j.Logger LOGGER = org.slf4j.LoggerFactory.getLogger(Class1.class);
Then i'm initializing the log4j properties,
PropertyConfigurator.configure(new FileInputStream("log4j.properties"));
Thanks!