Update logging

This commit is contained in:
2022-04-20 23:55:52 +02:00
parent 7140528441
commit 1b62e151a5
7 changed files with 74 additions and 4 deletions

View File

@@ -58,15 +58,16 @@ public class AttributeUpdaterKernel {
}
private void process(File file, ProgressBar progressBar) {
statistic.total();
List<FileAttribute> attributes = processor.loadAttributes(file);
FileInfoDto fileInfo = processor.filterAttributes(attributes);
statistic.total();
if (fileInfo.isChangeNecessary()) {
statistic.shouldChange();
if (!Config.getInstance().isSafeMode()) {
try {
processor.update(file, fileInfo);
statistic.success();
log.info("Updated {}", file.getAbsolutePath());
} catch (IOException e) {
statistic.failedChanging();
log.warn("File couldn't be updated: {}", file.getAbsoluteFile());