Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
BZ 1080508 - make sure we set log level so the install doesn't abort
Browse files Browse the repository at this point in the history
  • Loading branch information
jmazzitelli committed Apr 17, 2014
1 parent 94a3d1e commit 0209557
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -701,12 +701,19 @@ private void saveServerProperties(HashMap<String, String> serverProperties) thro
final File serverPropertiesFile = getServerPropertiesFile();
final PropertiesFileUpdate propsFile = new PropertiesFileUpdate(serverPropertiesFile.getAbsolutePath());

// GWT can't handle Properties - so we use HashMap but convert to Properties internally
// this code use to be used within GWT which is why the signature uses HashMap and we convert to Properties here
final Properties props = new Properties();
for (Map.Entry<String, String> entry : serverProperties.entrySet()) {
props.setProperty(entry.getKey(), entry.getValue());
}

// BZ 1080508 - the server will fail to install if rhq.server.log-level isn't set
// (as will be the case for upgrades from older versions), so force it to be set now
if (!props.containsKey(ServerProperties.PROP_LOG_LEVEL)) {
props.setProperty(ServerProperties.PROP_LOG_LEVEL, "INFO");
serverProperties.put(ServerProperties.PROP_LOG_LEVEL, "INFO");
}

propsFile.update(props);

// we need to put them as system properties now so when we hot deploy,
Expand Down

0 comments on commit 0209557

Please sign in to comment.