Skip to content

Commit

Permalink
Update log4j api
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl DeBisschop authored and kdebisschop committed Jul 2, 2020
1 parent 7134555 commit ad3f453
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
9 changes: 6 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,12 @@ dependencies {

implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.12.0'

implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.13.2'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.13.2'

implementation (
'org.rundeck:rundeck-core:3.2.4-20200318',
'org.rundeck:rundeck-storage-api:3.2.4-20200318',
'org.rundeck:rundeck-core:3.3.+',
'org.rundeck:rundeck-storage-api:3.3.+',
)

testImplementation group: 'junit', name: 'junit', version:'4.12'
Expand Down Expand Up @@ -125,5 +128,5 @@ jar {
}

wrapper {
gradleVersion = '6.4.1'
gradleVersion = '6.5.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
import com.dtolabs.rundeck.core.resources.ResourceModelSourceException;
import com.fasterxml.jackson.databind.JsonNode;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.slf4j.Logger;

import java.io.IOException;
import java.util.*;
Expand Down Expand Up @@ -135,15 +134,15 @@ private void getNodesForEnvironment(String environmentId) {
environmentName = this.getEnvironmentName(environmentId);
} catch (IOException e) {
environmentName = environmentId;
logger.log(Level.WARN, "Failed getting environment name");
logger.log(Level.WARN, e.getMessage());
logger.warn("Failed getting environment name");
logger.warn(e.getMessage());
}

if (configuration.getProperty(CONFIG_NODE_TYPE_INCLUDE_CONTAINER, "true").equals("true")) {
try {
data = this.getContainers(environmentId);
} catch (IOException e) {
logger.log(Level.WARN, e.getMessage());
logger.warn(e.getMessage());
return;
}
for (JsonNode node : data) {
Expand All @@ -161,7 +160,7 @@ private void getNodesForEnvironment(String environmentId) {
addServiceNode(node, environmentName, logger);
}
} catch (IOException e) {
logger.log(Level.WARN, e.getMessage());
logger.warn(e.getMessage());
}
}
}
Expand All @@ -187,7 +186,7 @@ private void addContainerNode(JsonNode node, String environmentName, Logger logg
}
iNodeEntries.putNode(nodeEntry);
} catch (IllegalArgumentException | NullPointerException e) {
logger.log(Level.WARN, e.getMessage());
logger.warn(e.getMessage());
}
}

Expand All @@ -197,7 +196,7 @@ private void addServiceNode(JsonNode node, String environmentName, Logger logger
NodeEntryImpl nodeEntry = rancherNode.getNodeEntry(environmentName, node);
iNodeEntries.putNode(nodeEntry);
} catch (IllegalArgumentException | NullPointerException e) {
logger.log(Level.WARN, e.getMessage());
logger.warn(e.getMessage());
}
}

Expand Down

0 comments on commit ad3f453

Please sign in to comment.