public static void checkLogFile(String log4jProperties, String logFileToCheck) throws Exception {
CompositeConfiguration compositeConfig = new CompositeConfiguration();
compositeConfig.addConfiguration(new EnvironmentConfiguration());
compositeConfig.addConfiguration(new PropertiesConfiguration(log4jProperties));
compositeConfig.addConfiguration(new SystemConfiguration());
// Read & parse properties file.
String logDirPath = userDir + fs + compositeConfig.getString(TestConstants.logDirectoryToken);
File fileToCheck = new File(logDirPath + fs + logFileToCheck);
BufferedReader br = new BufferedReader(new FileReader(fileToCheck));