Skip to content

Commit

Permalink
Simplify creation of debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-ronge committed Dec 4, 2024
1 parent 01c169e commit b64a28a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,7 @@ public IndexingKeyworder(Process process) {
var taskKeywords = initTaskKeywords(process.getTasksUnmodified());
this.taskKeywords = filterMinLength(taskKeywords.getLeft());
this.taskPseudoKeywords = filterMinLength(taskKeywords.getRight());
String place = null;
if (logger.isDebugEnabled()) {
place = "process " + process.getId() + " \"" + process.getTitle() + "\"";
}
var metadataKeywords = initMetadataKeywords(process, place);
var metadataKeywords = initMetadataKeywords(process);
this.metadataKeywords = filterMinLength(metadataKeywords.getLeft());
this.metadataPseudoKeywords = filterMinLength(metadataKeywords.getRight());
this.processId = process.getId().toString();
Expand Down Expand Up @@ -220,7 +216,7 @@ private static final Pair<Set<String>, Set<String>> initTaskKeywords(Collection<
* Can be null if logging is disabled on the debug level.
* @return metadata keywords, and metadata pseudo keywords
*/
private static final Pair<Set<String>, Set<String>> initMetadataKeywords(Process process, String placeDebug) {
private static final Pair<Set<String>, Set<String>> initMetadataKeywords(Process process) {
final Pair<Set<String>, Set<String>> emptyResult = Pair.of(Collections.emptySet(), Collections.emptySet());
try {
String processId = Integer.toString(process.getId());
Expand All @@ -230,7 +226,7 @@ private static final Pair<Set<String>, Set<String>> initMetadataKeywords(Process
: "Missing metadata file for indexing: ") + path);
return emptyResult;
}
logger.debug("Indexing {} in {}", path, placeDebug);
logger.debug("Indexing {} in process {} \"{}\"", path, process.getId(), process.getTitle());
String metaXml = FileUtils.readFileToString(path.toFile(), StandardCharsets.UTF_8);
if (!metaXml.contains(ANY_METADATA_MARKER)) {
return emptyResult;
Expand Down
2 changes: 1 addition & 1 deletion Kitodo/src/main/resources/messages/messages_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ dashboard=Tablero de mandos
dataPrivacy=Privacidad
# used in "LegalTexts.java"
dataPrivacyDefaultText=La información sobre la privacidad de este sistema aún no se ha archivado.
databaseStatistic=Estadísticas de la base de datos
databaseStatistic=Estadísticas basadas en los datos
day=Día
days=Días
deactivatedTemplates=Plantillas desactivadas
Expand Down

0 comments on commit b64a28a

Please sign in to comment.