Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ repositories {
mavenCentral()
}

dependencies {
implementation 'org.slf4j:slf4j-api:2.0.16'
runtimeOnly 'org.slf4j:slf4j-simple:2.0.16'
}

application {
mainClass = 'dev.trly.java.example.primitive.wrappers.LaunchChecklistApp'
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package dev.trly.java.example.primitive.wrappers;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public final class LaunchChecklistApp {
private static final Logger LOGGER = LoggerFactory.getLogger(LaunchChecklistApp.class);

private LaunchChecklistApp() {
}

Expand All @@ -22,12 +27,12 @@ public static void main(String[] args) {
for (int index = 0; index < readiness.length; index++) {
final boolean ready = readiness[index].booleanValue();
final String status = ready ? "ready" : "waiting";
System.out.printf("%s: %s%n", steps[index], status);
LOGGER.info("{}: {}", steps[index], status);
if (ready) {
readyCount++;
}
}

System.out.printf("Summary: %d of %d steps are ready%n", readyCount, readiness.length);
LOGGER.info("Summary: {} of {} steps are ready", readyCount, readiness.length);
}
}
Loading