Skip to content

Commit 43e8ea4

Browse files
committed
chore: logging improvement
1 parent 9887fce commit 43e8ea4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/main/kotlin/spp/protocol/instrument/command/LiveInstrumentCommand.kt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,14 @@ data class LiveInstrumentCommand(
4545
return buildString {
4646
append("LiveInstrumentCommand(")
4747
append("commandType=").append(commandType)
48-
append(", instruments=").append(instruments.size)
49-
append(", locations=").append(locations.size)
48+
if (instruments.size > 1) {
49+
append(", instruments=").append(instruments.size)
50+
} else if (instruments.size == 1) {
51+
append(", instrument=").append(instruments.first().id)
52+
}
53+
if (locations.isNotEmpty()) {
54+
append(", locations=").append(locations.size)
55+
}
5056
append(")")
5157
}
5258
}

0 commit comments

Comments
 (0)