Skip to content

Commit ad3cd6d

Browse files
logging: minor adjustments to log messages
1 parent 1a694f7 commit ad3cd6d

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/main/java/org/variantsync/vevos/simulation/io/kernelhaven/KernelHavenPCIO.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.variantsync.vevos.simulation.io.ResourceWriter;
1010
import org.variantsync.vevos.simulation.io.Resources;
1111
import org.variantsync.vevos.simulation.io.data.CSV;
12+
import org.variantsync.vevos.simulation.util.Logger;
1213
import org.variantsync.vevos.simulation.util.fide.bugfix.FixTrueFalse;
1314
import org.variantsync.vevos.simulation.util.io.CaseSensitivePath;
1415
import org.variantsync.vevos.simulation.util.io.PathUtils;
@@ -44,9 +45,11 @@ public boolean canWrite(final Path p) {
4445
public Result<Artefact, Exception> load(final Path csvPath) {
4546
final Map<CaseSensitivePath, SourceCodeFile> files = new HashMap<>();
4647
final CSV csv;
48+
Logger.debug("Loading csv file: " + csvPath);
4749
try {
4850
csv = Resources.Instance().load(CSV.class, csvPath);
4951
} catch (final Resources.ResourceIOException resourceFailure) {
52+
Logger.warning("Was not able to load csv file: " + resourceFailure);
5053
return Result.Failure(resourceFailure);
5154
}
5255

@@ -75,6 +78,7 @@ public Result<Artefact, Exception> load(final Path csvPath) {
7578
p -> new SourceCodeFile(fileCondition, p))
7679
.addTrace(createAnnotation(blockCondition, startLine, endLine));
7780
} catch (final Exception e) {
81+
Logger.warning("Was not able to parse csv file: " + e);
7882
return Result.Failure(e);
7983
}
8084
}

src/main/java/org/variantsync/vevos/simulation/variability/pc/SourceCodeFile.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public Result<GroundTruth, Exception> generateVariant(
5353
if (!Files.exists(sourceFile.path())) {
5454
return Result.Failure(new FileNotFoundException("Source file " + sourceFile + " does not exist!"));
5555
}
56-
5756
return
5857
// Create the target file.
5958
PathUtils.createEmptyAsResult(targetFile.path())

src/main/java/org/variantsync/vevos/simulation/variability/pc/variantlines/VariantLine.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ public List<String> project(final VariantGenerationOptions projectionOptions, fi
2323
// This was logged frequently and is caused by https://bugs.openjdk.java.net/browse/JDK-8199413
2424
// Skipping the line really is the best solution, as the empty line is created by appending a line separator
2525
// to the previous line. I added the additional if-statement, to only catch cases in which more than one line
26-
// is out of bounds, which indicates a serious problem.
27-
Logger.error(logMessage);
26+
// is out of bounds, which might indicate a problem.
27+
Logger.debug(logMessage);
2828
}
2929

3030
return List.of();

0 commit comments

Comments
 (0)