getLogFileUrl no longer searches user.dir for log4j properties file GT-2834

This commit is contained in:
ghidra4 2019-04-24 17:38:24 -04:00
parent cfc51a00ea
commit ecdf92eb05

View File

@ -121,22 +121,17 @@ def createDir(dirPath) {
}
/*********************************************************************************
* Finds the log4j properties file and returns its path.
* Retrieves log4j properties file and returns its path.
*********************************************************************************/
def getLogFileUrl() {
String rootDir = System.properties.get("user.dir")
String foundFile
new File(rootDir).eachFileRecurse(groovy.io.FileType.FILES) {
if (it.path.endsWith('src/main/resources/generic.log4jtest.xml')) {
foundFile = "file:" + it.path.toString()
return "file:" + it.path.toString()
String logFilePath = "$rootDir/Ghidra/Framework/Generic/src/main/resources/generic.log4jtest.xml"
File logFile = new File(logFilePath)
if (logFile.exists()) {
return logFile.toURI().toString()
}
throw new GradleException("Cannot find log4j properties file using path '$logFilePath'")
}
return foundFile
}
/*********************************************************************************
* Creates a new debug port randomly.
*********************************************************************************/