Skip to content

Commit

Permalink
Move log4j.properties to appropriate target location, take out custom…
Browse files Browse the repository at this point in the history
… logic just to do the same thing
  • Loading branch information
gschueler committed Dec 3, 2010
1 parent d05d282 commit 7d8b18f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions rundeckapp/src/java/com/dtolabs/rundeck/ExpandRunServer.java
Expand Up @@ -276,12 +276,10 @@ public void run(final String[] args) throws Exception {
configuration = createConfiguration(defaults);

configuration.put("realm.properties.location", configDir.getAbsolutePath() + "/realm.properties");
configuration.put("log4j.properties.location", expdir.getAbsolutePath() + "/webapp/WEB-INF/classes/log4j.properties");

DEBUG("Runtime configuration properties: " + configuration);

expandTemplates(configuration, serverdir, rewrite);
placeLog4jConfig(configuration, new File(configDir, "log4j.properties"));
setScriptFilesExecutable(new File(serverdir, "sbin"));
} else {
configuration.putAll(defaults);
Expand Down Expand Up @@ -317,20 +315,6 @@ public boolean accept(final File file, final String s) {
}
}

/**
* Move log4j configuration file from config dir to webapp location if it does not exist
* @param configuration configuration properties
* @param log4jConfigFile source log4j config file
* @throws IOException if an error occurs
*/
private void placeLog4jConfig(final Properties configuration, final File log4jConfigFile) throws IOException {
//copy log4j config
final File log4jdest = new File(configuration.getProperty("log4j.properties.location"));
if (!log4jdest.exists() && !log4jConfigFile.renameTo(log4jdest)) {
ERR("Couldn't move log4j.properties file to destination: " + log4jdest.getAbsolutePath());
}
}

private void copyToolLibs(final File toolslibdir, final File coreJar) throws IOException {
if (!toolslibdir.isDirectory()) {
if (!toolslibdir.mkdirs()) {
Expand Down

0 comments on commit 7d8b18f

Please sign in to comment.