dbf-importer log fix

This commit is contained in:
ialbert 2022-12-21 12:09:52 +03:00
parent fd7ee9a989
commit b4c3388e06
2 changed files with 8 additions and 4 deletions

View file

@ -42,18 +42,22 @@ public class DBFImporterService {
}
public void run(ETable specificTable) {
log.info("adding import task {}", specificTable != null ? specificTable.name() : "");
if (specificTable == null) {
log.trace("adding import task");
} else {
log.info("adding import task {}", specificTable);
}
executorService.execute(() -> {
Map<ETable, List<File>> newFiles = null;
try {
log.info("checking new files... {}", specificTable != null ? specificTable.name() : "");
log.trace("checking new files... {}", specificTable != null ? specificTable.name() : "");
newFiles = getFiles(specificTable);
if (newFiles.size() > 0 && log.isDebugEnabled()) {
log.debug("following files will be processed {}", forLogging(newFiles));
} else if (newFiles.size() > 0) {
log.info("following files will be processed {}", forLoggingSizeOnly(newFiles));
} else {
log.info("no files were found");
log.trace("no files were found");
}
for (Map.Entry<ETable, List<File>> newFilesEntry : newFiles.entrySet()) {
ETable currTable = newFilesEntry.getKey();

View file

@ -3,7 +3,7 @@
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<charset>UTF-8</charset>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
<pattern>%date{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>