Skip to content

Commit

Permalink
Skip logging stacktrace for EC2 detection
Browse files Browse the repository at this point in the history
  • Loading branch information
vahidhashemian committed Mar 14, 2024
1 parent 62bcf04 commit b1c455f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions psc/src/main/java/com/pinterest/psc/common/PscUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected static boolean doesEc2MetadataExist() {
Process process = processBuilder.start();
return process.waitFor() == 0;
} catch (Exception e) {
logger.info("Could not detect if host is EC2 from ec2metadata.", e);
logger.info("Could not detect if host is EC2 from ec2metadata.", e.getMessage());
return false;
}
}
Expand All @@ -51,7 +51,7 @@ protected static boolean isSysVendorAws() {
try {
return getFileContent("/sys/devices/virtual/dmi/id/sys_vendor").trim().equals("Amazon EC2");
} catch (Exception e) {
logger.info("Could not detect if host is EC2 from sys vendor.", e);
logger.info("Could not detect if host is EC2 from sys vendor.", e.getMessage());
return false;
}
}
Expand All @@ -60,7 +60,7 @@ protected static boolean isAwsOsDetected() {
try {
return System.getProperty("os.version").contains("aws");
} catch (Exception e) {
logger.info("Could not detect if host is EC2 from os version.", e);
logger.info("Could not detect if host is EC2 from os version.", e.getMessage());
return false;
}
}
Expand Down

0 comments on commit b1c455f

Please sign in to comment.