class LogUtils {
    /**
     * Creates a file logger that use heritrix.properties file logger
     * configuration.
     * Change the java.util.logging.FileHandler.* properties in
     * heritrix.properties to change file handler properties.
     * Use this method if you want a class to log to its own file
     * rather than use default (console) logger.
     * @param logsDir Directory in which to write logs.
     * @param baseName Base name to use for log file (Will have
     * java.util.logging.FileHandler.pattern or '.log' for suffix).
     * @param logger Logger whose handler we'll replace with the
     * file handler created herein.
     */
    public static FileHandler createFileLogger(File logsDir, String baseName,
            Logger logger) {<FILL_FUNCTION_BODY>}
}

        int limit =
            PropertyUtils.getIntProperty("java.util.logging.FileHandler.limit",
            1024 * 1024 * 1024 * 1024);
        int count =
            PropertyUtils.getIntProperty("java.util.logging.FileHandler.count", 1);
        try {
            String tmp =
                System.getProperty("java.util.logging.FileHandler.pattern");
                File logFile = new File(logsDir, baseName +
                    ((tmp != null && tmp.length() > 0)? tmp: ".log"));
            FileHandler fh = new FileHandler(logFile.getAbsolutePath(), limit,
                count, true);
            // Manage the formatter to use.
            tmp = System.getProperty("java.util.logging.FileHandler.formatter");
            if (tmp != null && tmp.length() > 0) {
                Constructor<?> co = Class.forName(tmp).
                    getConstructor(new Class[] {});
                Formatter f = (Formatter) co.newInstance(new Object[] {});
                fh.setFormatter(f);
            }
            logger.addHandler(fh);
            logger.setUseParentHandlers(false);
            return fh; 
        } catch (Exception e) {
            logger.severe("Failed customization of logger: " + e.getMessage());
            return null; 
        }
    
<no_super_class>