Skip to content

Commit

Permalink
Change log level to trace for some more noisy log entries
Browse files Browse the repository at this point in the history
  • Loading branch information
ascopes committed Nov 4, 2024
1 parent ec23315 commit dcf75a0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public Path createTemporarySpace(String... bits) {
dir = dir.resolve(bit);
}

log.debug("Creating temporary directory at '{}' if it does not already exist...", dir);
log.trace("Creating temporary directory at '{}' if it does not already exist...", dir);

// This should be concurrent-safe as it will not break if the directory already exists unless
// the directory is instead a regular file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ private List<Path> findJavaModules(List<Path> paths) {
.flatMap(Optional::stream)
.map(Path::of)
.map(FileUtils::normalize)
.peek(modulePath -> log.debug("Looks like {} is a JPMS module!", modulePath))
.peek(modulePath -> log.trace("Looks like {} is a JPMS module!", modulePath))
// Sort as the order of output is arbitrary, and this ensures reproducible builds.
.sorted(Comparator.comparing(Path::toString))
.collect(Collectors.toUnmodifiableList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public Optional<ProtoFileListing> createProtoFileListing(
try (var stream = Files.walk(rootPath)) {
return stream
.filter(filePath -> filter.matches(rootPath, filePath))
.peek(protoFile -> log.debug("Found proto file in root {}: {}", rootPath, protoFile))
.peek(protoFile -> log.trace("Found proto file in root {}: {}", rootPath, protoFile))
.collect(Collectors.collectingAndThen(
// Terminal operation, means we do not return a closed stream
// by mistake.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ public static FileSystem openZipAsFileSystem(Path zipPath) throws IOException {
// will open multiple file system objects. Other constructors do not appear to do this,
// so would not be thread-safe for concurrent plugin executions.
try {
log.debug("Opening a new NIO virtual file system for {}", zipPath);
log.trace("Opening a new NIO virtual file system for {}", zipPath);

return FileSystemProvider.installedProviders()
.stream()
.filter(provider -> provider.getScheme().equalsIgnoreCase("jar"))
.peek(provider -> log.debug("Found JAR file system provider at {}", provider))
.peek(provider -> log.trace("Found JAR file system provider at {}", provider))
.findFirst()
.orElseThrow(FileSystemNotFoundException::new)
.newFileSystem(zipPath, Map.of());
Expand All @@ -96,12 +96,12 @@ public static FileSystem openZipAsFileSystem(Path zipPath) throws IOException {

public static void makeExecutable(Path file) throws IOException {
try {
log.debug("Ensuring {} is executable", file);
log.trace("Ensuring {} is executable", file);
var perms = new HashSet<>(Files.getPosixFilePermissions(file));
perms.add(PosixFilePermission.OWNER_EXECUTE);
Files.setPosixFilePermissions(file, perms);
} catch (UnsupportedOperationException ex) {
log.debug("File system does not support setting POSIX file permissions");
log.trace("File system does not support setting POSIX file permissions");
}
}

Expand All @@ -120,7 +120,7 @@ public static List<Path> rebaseFileTree(
newPath = newPath.resolve(part.toString());
}

log.debug(
log.trace(
"copying {} to {} (existing root={}, new root={})",
existingPath,
newPath,
Expand Down

0 comments on commit dcf75a0

Please sign in to comment.