// Path: src/main/java/com/dogeops/cantilever/utils/ConfigurationSingleton.java
// public enum ConfigurationSingleton {
// 	instance;
// 	private static final Logger logger = Logger
// 			.getLogger(ConfigurationSingleton.class.getName());
// 
// 	private Properties props = new Properties();
// 
// 	private ConfigurationSingleton() {
// 	}
// 
// 	public void readConfigFile(String config_path) {
// 		try {
// 			InputStream input = new FileInputStream(config_path);
// 			props.load(input);
// 			input.close();
// 		} catch (IOException e) {
// 			cease(logger, e.getMessage());
// 		}
// 	}
// 
// 	public String getConfigItem(String val) {
// 		try {
// 			if (props.isEmpty()) {
// 				throw new Exception("Propery file object is empty. "
// 						+ "This likely indicates that the config singleton "
// 						+ "was not properly initialized via readConfigFile.");
// 			}
// 			if (props.getProperty(val) == null) {
// 				throw new Exception("The property " + val
// 						+ " is missing from the configurtion file.");
// 			}
// 			return props.getProperty(val);
// 		} catch (Exception e) {
// 			cease(logger, e.getMessage());
// 			return null;
// 		}
// 	}
// }
// 
// Path: src/main/java/com/dogeops/cantilever/utils/Timer.java
// public class Timer {
// 
// 	private long start;
// 	private long stop;
// 	private long elapsed;
// 
// 	public void start() {
// 		start = System.currentTimeMillis();
// 	}
// 
// 	public void stop() {
// 		stop = System.currentTimeMillis();
// 	}
// 
// 	public long getElapsed() {
// 		elapsed = stop - start;
// 		return elapsed;
// 	}
// }
// 
// Path: src/main/java/com/dogeops/cantilever/utils/Util.java
// public static void cease(Logger logger, String message) {
// 	logger.error(message);
// 	System.exit(1);
// }


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.log4j.Logger;
import com.dogeops.cantilever.utils.ConfigurationSingleton;
import com.dogeops.cantilever.utils.Timer;
import com.google.gson.Gson;
import static com.dogeops.cantilever.utils.Util.cease;
package com.dogeops.cantilever.logreader;





public class HTTPLogReader {
	private static final Logger logger = Logger.getLogger(HTTPLogReader.class
			.getName());
	private int fileCount = 0;

	public void readLogs(String path) {
		logger.info("Reading logs in " + path + "....");
		String log_regex = ConfigurationSingleton.instance
				.getConfigItem("log.convert.regex");
// Path: src/main/java/com/dogeops/cantilever/utils/ConfigurationSingleton.java
// public enum ConfigurationSingleton {
// 	instance;
// 	private static final Logger logger = Logger
// 			.getLogger(ConfigurationSingleton.class.getName());
// 
// 	private Properties props = new Properties();
// 
// 	private ConfigurationSingleton() {
// 	}
// 
// 	public void readConfigFile(String config_path) {
// 		try {
// 			InputStream input = new FileInputStream(config_path);
// 			props.load(input);
// 			input.close();
// 		} catch (IOException e) {
// 			cease(logger, e.getMessage());
// 		}
// 	}
// 
// 	public String getConfigItem(String val) {
// 		try {
// 			if (props.isEmpty()) {
// 				throw new Exception("Propery file object is empty. "
// 						+ "This likely indicates that the config singleton "
// 						+ "was not properly initialized via readConfigFile.");
// 			}
// 			if (props.getProperty(val) == null) {
// 				throw new Exception("The property " + val
// 						+ " is missing from the configurtion file.");
// 			}
// 			return props.getProperty(val);
// 		} catch (Exception e) {
// 			cease(logger, e.getMessage());
// 			return null;
// 		}
// 	}
// }
// 
// Path: src/main/java/com/dogeops/cantilever/utils/Timer.java
// public class Timer {
// 
// 	private long start;
// 	private long stop;
// 	private long elapsed;
// 
// 	public void start() {
// 		start = System.currentTimeMillis();
// 	}
// 
// 	public void stop() {
// 		stop = System.currentTimeMillis();
// 	}
// 
// 	public long getElapsed() {
// 		elapsed = stop - start;
// 		return elapsed;
// 	}
// }
// 
// Path: src/main/java/com/dogeops/cantilever/utils/Util.java
// public static void cease(Logger logger, String message) {
// 	logger.error(message);
// 	System.exit(1);
// }


// Path: src/main/java/com/dogeops/cantilever/logreader/HTTPLogReader.java
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.log4j.Logger;
import com.dogeops.cantilever.utils.ConfigurationSingleton;
import com.dogeops.cantilever.utils.Timer;
import com.google.gson.Gson;
import static com.dogeops.cantilever.utils.Util.cease;

package com.dogeops.cantilever.logreader;





public class HTTPLogReader {
	private static final Logger logger = Logger.getLogger(HTTPLogReader.class
			.getName());
	private int fileCount = 0;

	public void readLogs(String path) {
		logger.info("Reading logs in " + path + "....");
		String log_regex = ConfigurationSingleton.instance
				.getConfigItem("log.convert.regex");
		Timer t = new Timer();