Skip to content

Commit

Permalink
Log improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
bubner committed Dec 2, 2024
1 parent 83c69b3 commit 0dd8713
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private void callback(@Nullable Reference<?> selectedOpMode) {

String timeLeft = getApproximateTimeLeft();
Text.Builder out = Text.builder();
out.append("[AutonomousBunyipsOpMode] onReady() called | %% task(s) queued% | % subsystems\n",
out.append("[AutonomousBunyipsOpMode] onReady() called | %% task(s) queued% | % subsystem(s)\n",
userSelection != null ? "usr: " + Text.removeHtml(String.valueOf(selectedOpMode)) + " | " : "",
taskCount,
timeLeft.isEmpty() ? "" : timeLeft + " to complete",
Expand All @@ -95,7 +95,7 @@ private void callback(@Nullable Reference<?> selectedOpMode) {
}
out.append("\n");
for (BunyipsSubsystem subsystem : updatedSubsystems) {
out.append(" :: %\n", subsystem);
out.append(" :: %\n", subsystem.toVerboseString());
}
Dbg.logd(out.toString());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected void sout(Consumer<String> logger, String format, Object... objs) {
*/
@NonNull
public final String toVerboseString() {
return Text.format("%%%% (%) <=> %", assertionFailed ? "[error]" : "", threadName != null ? " [async]" : "", parent != null ? " [delegated to " + parent + "]" : "", " " + name, shouldRun ? "enabled" : "disabled", getCurrentTask());
return Text.format("%%%% <%> (%) <=> %", assertionFailed ? "[error]" : "", threadName != null ? " [async]" : "", parent != null ? " [delegated to " + parent + "]" : "", " " + name, getClass().getSimpleName(), shouldRun ? "enabled" : "disabled", getCurrentTask());
}

/**
Expand Down

0 comments on commit 0dd8713

Please sign in to comment.