Skip to content

Commit

Permalink
[api] Fixes logging calling convention (#3394)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankfliu authored Aug 7, 2024
1 parent 90d8279 commit 1e2554c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private TranslatorFactory loadTranslatorFactory(String className) {
Constructor<? extends TranslatorFactory> constructor = subclass.getConstructor();
return constructor.newInstance();
} catch (Throwable e) {
logger.trace("Not able to load TranslatorFactory: " + className, e);
logger.trace("Not able to load TranslatorFactory: {}", className, e);
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private TranslatorFactory loadTranslatorFactory(String className) {
Constructor<? extends TranslatorFactory> constructor = subclass.getConstructor();
return constructor.newInstance();
} catch (Throwable e) {
logger.trace("Not able to load TranslatorFactory: " + className, e);
logger.trace("Not able to load TranslatorFactory: {}", className, e);
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public boolean hasCapability(String capability) {
sessionOptions.addCUDA();
return true;
} catch (OrtException e) {
logger.warn("CUDA is not supported OnnxRuntime engine: " + e.getMessage());
logger.warn("CUDA is not supported OnnxRuntime engine: {}", e.getMessage());
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion extensions/tokenizers/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ tasks {
for (task in tasks) {
var file = prefix / task / "ai.djl.huggingface.pytorch.json"
if (file.exists())
project.logger.lifecycle("PyTorch model zoo metadata alrady exists: $task")
project.logger.lifecycle("PyTorch model zoo metadata already exists: $task")
else {
project.logger.lifecycle("Downloading PyTorch model zoo metadata: $task")
file.parentFile.mkdirs()
Expand Down

0 comments on commit 1e2554c

Please sign in to comment.