Skip to content

Commit

Permalink
Use logging placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
spannm committed Mar 27, 2024
1 parent aab0d24 commit 8b1b177
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/main/java/io/github/spannm/jackcess/DatabaseBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,7 @@ public Database open() throws IOException {
* Creates a new Database using the configured information.
*/
public Database create() throws IOException {
Database db = DatabaseImpl.create(_fileFormat, _mdbFile, _channel, _autoSync,
_charset, _timeZone);
Database db = DatabaseImpl.create(_fileFormat, _mdbFile, _channel, _autoSync, _charset, _timeZone);
if (_dbProps != null) {
PropertyMap props = db.getDatabaseProperties();
props.putAll(_dbProps.values());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ protected int getRootPageNumber() {

private void setUnsupportedReason(String reason, ColumnImpl col) {
_unsupportedReason = withErrorContext(reason);
LOGGER.log(col.getTable().isSystem() ? Level.DEBUG : Level.WARNING, _unsupportedReason + ", making read-only");
LOGGER.log(col.getTable().isSystem() ? Level.DEBUG : Level.WARNING, "{0}, making read-only", _unsupportedReason);
}

String getUnsupportedReason() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private static void findRow(final TestDb testDB, Table t, Index index, Row expec
String rowId = expectedRow.getString("name");
String tName = t.getName();
if (("Table11".equals(tName) || "Table11_desc".equals(tName)) && ("row10".equals(rowId) || "row11".equals(rowId) || "row12".equals(rowId))) {
getStaticLogger().log(Level.WARNING, "TODO long rows not handled completely yet in V2010: " + tName + ", " + rowId);
getStaticLogger().log(Level.WARNING, "TODO long rows not handled completely yet in V2010: {0}, {1}", tName, rowId);
return;
}
}
Expand Down Expand Up @@ -245,7 +245,7 @@ void testReadAllCodesMdb() throws Exception {
String entryStr = entryToString(cursor.getSavepoint().getCurrentPosition());
getLogger().log(Level.DEBUG, "=======");
getLogger().log(Level.DEBUG, "Entry Bytes: {0}", entryStr);
getLogger().log(Level.DEBUG, "Value: " + cursor.getCurrentRow() + "; " + toUnicodeStr(cursor.getCurrentRow().get("data")));
getLogger().log(Level.DEBUG, "Value: {0}; {1}", cursor.getCurrentRow(), toUnicodeStr(cursor.getCurrentRow().get("data")));
}
}
}
Expand Down

0 comments on commit 8b1b177

Please sign in to comment.