// Path: src/main/java/RFLogger.java
// public class RFLogger {
// 
//     private String fileName = "./classes/log.properties";
//     private static java.util.logging.Logger logger = null;
//     
//     private static ConsoleHandler consoleHandler;
//     
//     private static SimpleFormatter simpleFormatter;
// 
//     private RFLogger() {
// 
//         // Create the logger.
//         logger = java.util.logging.Logger.getLogger(RFLogger.class.getName());
// 
//         try {
//             java.util.logging.LogManager.getLogManager().readConfiguration(new FileInputStream(fileName));
// 
//         }
//         catch (IOException e) {
//             System.out.println("Unable to configure logging for " + fileName);
// 
//             e.printStackTrace();
// 
//             System.out.println("Resorting to console handler.");
// 
//         
//             //Create consoleHandler.
//             consoleHandler = new ConsoleHandler();
//         
//             //Assigning handler to logger object.
//             logger.addHandler(consoleHandler);
//         
//             //Setting levels to handler and logger.
//             consoleHandler.setLevel(Level.INFO);
//             logger.setLevel(Level.ALL);
//         
//             // Creating SimpleFormatter for human readable format.
//             simpleFormatter = new SimpleFormatter();
// 
//             // Setting formatter to all handlers.
//             consoleHandler.setFormatter(simpleFormatter);
// 
//             // Remove parent handlers in order to respect our formatting only.
//             // logger.setUseParentHandlers(false);
//         }
//     }
//     
//     private static java.util.logging.Logger getLogger() {
//         if(logger == null){
//             new RFLogger();
//         }
//         return logger;
//     }
//     
//     public static void log(Level level, String msg, Throwable thrown){
//         getLogger().log(level, msg, thrown);
//     }
//     
//     public static void log(Level level, String msg){
//         getLogger().log(level, msg);
//     }
// 
// }


import com.kogalur.randomforest.RFLogger;
import java.util.logging.Level;
import java.util.Random;
            RFLogger.log(Level.WARNING, "Overriding trace with default value:  0");
            set_trace(0);
        }
    }
        
    /**
     * Returns the trace parameter indicating the specified update interval in seconds.
     * @return The trace parameter indicating the specified update interval in seconds.
     */
    public int get_trace() {
        return trace;
    }


    /**
    * Sets the number of cores to be used by the algorithm when OpenMP
    * parallel processing is in force.  
    * @param rfCores The number of cores to be used by the algorithm when OpenMP
    * parallel processing is in force. The default behaviour is to
    * use all cores available.  This is achieved by setting the
    * parameter to a negative value.  The result is that each core
    * will be independently tasked with growing a tree.  Significant
    * savings in elapsed computation times can be achieved.
    */
    public void set_rfCores(int rfCores) {
        int availableCores = Runtime.getRuntime().availableProcessors();

        this.rfCores = rfCores;
        if (rfCores > availableCores) {
            RFLogger.log(Level.WARNING, "Invalid value for parameter rfCores:  " + rfCores);
// Path: src/main/java/RFLogger.java
// public class RFLogger {
// 
//     private String fileName = "./classes/log.properties";
//     private static java.util.logging.Logger logger = null;
//     
//     private static ConsoleHandler consoleHandler;
//     
//     private static SimpleFormatter simpleFormatter;
// 
//     private RFLogger() {
// 
//         // Create the logger.
//         logger = java.util.logging.Logger.getLogger(RFLogger.class.getName());
// 
//         try {
//             java.util.logging.LogManager.getLogManager().readConfiguration(new FileInputStream(fileName));
// 
//         }
//         catch (IOException e) {
//             System.out.println("Unable to configure logging for " + fileName);
// 
//             e.printStackTrace();
// 
//             System.out.println("Resorting to console handler.");
// 
//         
//             //Create consoleHandler.
//             consoleHandler = new ConsoleHandler();
//         
//             //Assigning handler to logger object.
//             logger.addHandler(consoleHandler);
//         
//             //Setting levels to handler and logger.
//             consoleHandler.setLevel(Level.INFO);
//             logger.setLevel(Level.ALL);
//         
//             // Creating SimpleFormatter for human readable format.
//             simpleFormatter = new SimpleFormatter();
// 
//             // Setting formatter to all handlers.
//             consoleHandler.setFormatter(simpleFormatter);
// 
//             // Remove parent handlers in order to respect our formatting only.
//             // logger.setUseParentHandlers(false);
//         }
//     }
//     
//     private static java.util.logging.Logger getLogger() {
//         if(logger == null){
//             new RFLogger();
//         }
//         return logger;
//     }
//     
//     public static void log(Level level, String msg, Throwable thrown){
//         getLogger().log(level, msg, thrown);
//     }
//     
//     public static void log(Level level, String msg){
//         getLogger().log(level, msg);
//     }
// 
// }


// Path: src/main/java/GenericModelArg.java
import com.kogalur.randomforest.RFLogger;
import java.util.logging.Level;
import java.util.Random;

            RFLogger.log(Level.WARNING, "Overriding trace with default value:  0");
            set_trace(0);
        }
    }
        
    /**
     * Returns the trace parameter indicating the specified update interval in seconds.
     * @return The trace parameter indicating the specified update interval in seconds.
     */
    public int get_trace() {
        return trace;
    }


    /**
    * Sets the number of cores to be used by the algorithm when OpenMP
    * parallel processing is in force.  
    * @param rfCores The number of cores to be used by the algorithm when OpenMP
    * parallel processing is in force. The default behaviour is to
    * use all cores available.  This is achieved by setting the
    * parameter to a negative value.  The result is that each core
    * will be independently tasked with growing a tree.  Significant
    * savings in elapsed computation times can be achieved.
    */
    public void set_rfCores(int rfCores) {
        int availableCores = Runtime.getRuntime().availableProcessors();

        this.rfCores = rfCores;
        if (rfCores > availableCores) {
            RFLogger.log(Level.WARNING, "Invalid value for parameter rfCores:  " + rfCores);
            RFLogger.log(Level.WARNING, "Overriding rfCores with (" + availableCores + "), the maximum available processors.");