Skip to content

Commit

Permalink
[epilogue] Add a measure's symbol to its name when logged by Epilogue (
Browse files Browse the repository at this point in the history
  • Loading branch information
WispySparks authored Dec 22, 2024
1 parent 02a0adc commit 469bb32
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,10 @@ default <S> void log(String identifier, Collection<S> value, Struct<S> struct) {
*
* @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());
}

/**
Expand All @@ -212,7 +213,7 @@ default void log(String identifier, Measure<?> value) {
* @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));
}

/**
Expand Down

0 comments on commit 469bb32

Please sign in to comment.