Skip to content

Commit

Permalink
[Improve] Unified logging standards.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrart committed May 23, 2024
1 parent e35ec93 commit ecb25e3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public boolean verifyClusterConnection() {
JacksonUtils.read(result, Overview.class);
return true;
} catch (Exception e) {
log.error("verify cluster {} connection failed!", address, e);
log.error("Verify cluster {} connection failed!", address, e);
}
return false;
} else if (ExecutionMode.YARN_SESSION.equals(this.getExecutionModeEnum())) {
Expand All @@ -180,7 +180,7 @@ public boolean verifyClusterConnection() {
JacksonUtils.read(result, Overview.class);
return true;
} catch (Exception e) {
log.error("verify cluster connection failed!", e);
log.error("Verify cluster connection failed!", e);
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public Boolean delete(Long id) throws InternalException {
removeById(id);
return true;
} catch (Exception e) {
log.error("delete application {} failed!", id, e);
log.error("Delete application {} failed!", id, e);
throw new InternalException(e.getMessage());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public String upload(MultipartFile file) throws Exception {
try {
file.transferTo(saveFile);
} catch (Exception e) {
log.error("upload file {} failed!", fileName, e);
log.error("Upload file {} failed!", fileName, e);
throw new ApiDetailException(e);
}
return saveFile.getAbsolutePath();
Expand Down Expand Up @@ -496,7 +496,7 @@ private void removeApp(Application application) {
HdfsOperator.delete(path);
}
} catch (Exception e) {
log.error(Utils.stringifyException(e));
log.error("Remove application {} failed!", appId, e);
}
}

Expand Down Expand Up @@ -807,7 +807,7 @@ public boolean create(Application appParam) {
}
return true;
} else {
log.error("create application failed");
log.error("Create application failed!");
throw new ApiAlertException("create application failed");
}
}
Expand Down Expand Up @@ -1846,7 +1846,7 @@ private void doStopped(Application appParam) {
yarnClient.killApplication(applications.get(0).getApplicationId());
}
} catch (Exception e) {
log.error("doStopped failed!", e);
log.error("Stopped failed!", e);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ public List<Map<String, Object>> listConf(Project project) {
}
return list;
} catch (Exception e) {
log.error("List conf Failed!", e);
log.error(e.getMessage());
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public Boolean delete(Long id, Application application) throws InternalException
removeById(id);
return true;
} catch (Exception e) {
log.error("delete application :{} failed!", id, e);
log.error("Delete application {} failed!", id, e);
throw new InternalException(e.getMessage());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public boolean update(Setting setting) {
optional.ifPresent(x -> x.setSettingValue(value));
return true;
} catch (Exception e) {
log.error("update setting failed!", e);
log.error("Update setting failed!", e);
return false;
}
}
Expand Down

0 comments on commit ecb25e3

Please sign in to comment.