Skip to content

Commit

Permalink
chore: make sure to use parameters in logging
Browse files Browse the repository at this point in the history
  • Loading branch information
tglman committed Sep 30, 2024
1 parent 9899907 commit 5f10539
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ public void close() {
}
}
} catch (Exception e) {
logger.error("Error during context close for db " + url, e);
logger.error("Error during context close for db %s", e, url);
}
}
}
Expand Down Expand Up @@ -649,7 +649,7 @@ public void createClass(final String className, final OClass superClass) {
} catch (OException e) {
throw new IllegalArgumentException(e);
}
logger.info("created class '" + className + "' as subclass of '" + superClass + "'");
logger.info("created class '%s' as subclass of '%s'", className, className);
} else {
if (!cls.isSubClassOf(superClass)) {
throw new IllegalArgumentException(
Expand Down Expand Up @@ -754,7 +754,7 @@ public <RET> RET execute(
for (String s : iOperationStrings) msg.append(s);

// ASSURE PENDING TX IF ANY IS COMMITTED
logger.warn(msg.toString());
logger.warn("%s", msg.toString());
}
return iCallable.call(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ public Set<OrientIndexQuery> findIndex() {
// TODO: select best index if there are multiple options
indexedQueries.add(new OrientIndexQuery(keyIndexes.next(), values));
} else {
logger.warn(
"no index found for class=[" + className + "] and key=[" + key + "]");
logger.warn("no index found for class=[%s] and key=[%s]", className, key);
}
});
});
Expand Down

0 comments on commit 5f10539

Please sign in to comment.