protected final void createLogResourceWithPK(String encoding, Locale locale,
TimeZone timeZone) throws IOException {
cleanUp(false, true);
File logFile = getLogFile();
Assert.isNotNull(logFile, "logFile");
ILogResourceFactory factory = doGetLogResourceFactory();
Assert.isNotNull(factory, "factory");
ILogResource log = factory.createLogResource();
log.setName(getLogFile().getName());
log.setDialect(createLogDialect());
try {
log.configure(IHasEncoding.OPTION_ENCODING, encoding);
log.configure(IHasLocale.OPTION_LOCALE, LocaleUtils.getLocaleId(locale));