You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2022/10/13 07:27:32 UTC
[GitHub] [cloudstack] DaanHoogland commented on a diff in pull request #6825: resolve sanity check last id file acces problems
DaanHoogland commented on code in PR #6825:
URL: https://github.com/apache/cloudstack/pull/6825#discussion_r994257023
##########
usage/src/main/java/com/cloud/usage/UsageSanityChecker.java:
##########
@@ -170,14 +188,21 @@ protected void checkSnapshotUsage() {
}
protected void readLastCheckId(){
+ if (s_logger.isDebugEnabled()) {
+ s_logger.debug("reading last checked id for sanity check");
Review Comment:
This is excessive capitalisation to me, I won´t apply this.
##########
usage/src/main/java/com/cloud/usage/UsageSanityChecker.java:
##########
@@ -170,14 +188,21 @@ protected void checkSnapshotUsage() {
}
protected void readLastCheckId(){
+ if (s_logger.isDebugEnabled()) {
+ s_logger.debug("reading last checked id for sanity check");
+ }
try(BufferedReader reader = new BufferedReader(new FileReader(lastCheckFile));) {
String lastIdText = null;
lastId = -1;
- if ((reader != null) && (lastIdText = reader.readLine()) != null) {
+ if ((lastIdText = reader.readLine()) != null) {
lastId = Integer.parseInt(lastIdText);
}
} catch (Exception e) {
- s_logger.error("readLastCheckId:Exception:"+e.getMessage(),e);
+ String msg = String.format("error reading the LastCheckId reason: %s", e.getMessage());
Review Comment:
This is excessive capitalisation to me, I won´t apply.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org