[epilogue] Add a measure's symbol to its name when logged by Epilogue (#7535)

This commit is contained in:
Wispy
2024-12-22 15:35:31 -06:00
committed by GitHub
parent 02a0adc653
commit 469bb3290d

View File

@@ -198,9 +198,10 @@ public interface EpilogueBackend {
*
* @param identifier the identifier of the data field
* @param value the new value of the data field
* @param <U> the dimension of the unit
*/
default void log(String identifier, Measure<?> value) {
log(identifier, value.baseUnitMagnitude());
default <U extends Unit> void log(String identifier, Measure<U> value) {
log(identifier, value, value.baseUnit());
}
/**
@@ -212,7 +213,7 @@ public interface EpilogueBackend {
* @param <U> the dimension of the unit
*/
default <U extends Unit> void log(String identifier, Measure<U> value, U unit) {
log(identifier, value.in(unit));
log(identifier + " (" + unit.symbol() + ")", value.in(unit));
}
/**