Fix logging

This commit is contained in:
vshcherb 2011-12-30 12:26:37 +01:00
parent 75ebc5dfa0
commit c586357631

View file

@ -30,6 +30,7 @@ import java.util.logging.FileHandler;
import java.util.logging.Handler; import java.util.logging.Handler;
import java.util.logging.LogManager; import java.util.logging.LogManager;
import java.util.logging.Logger; import java.util.logging.Logger;
import java.util.logging.Level;
import java.util.logging.SimpleFormatter; import java.util.logging.SimpleFormatter;
import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.DocumentBuilderFactory;
@ -569,6 +570,7 @@ public class IndexBatchCreator {
} }
if(fh != null) { if(fh != null) {
LogManager.getLogManager().getLogger("").removeHandler(fh); LogManager.getLogManager().getLogger("").removeHandler(fh);
fh.close();
} }
} catch (Exception e) { } catch (Exception e) {
log.error("Exception generating indexes for " + f.getName(), e); //$NON-NLS-1$ log.error("Exception generating indexes for " + f.getName(), e); //$NON-NLS-1$