Skip to content

Commit dff4e78

Browse files
committed
Show offending file and line in runtime warnings
1 parent 16c4a96 commit dff4e78

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/LayoutInspector/DebugLayoutImpl.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ public final class LogStore: ObservableObject {
198198
func registerViewLabelAndWarnIfNotUnique(_ label: String, file: StaticString, line: UInt) {
199199
DispatchQueue.main.async { [self] in
200200
if viewLabels.contains(label) {
201-
let message: StaticString = "Duplicate view label '%s' detected. Use unique labels in layoutStep() calls"
202-
runtimeWarning(message, [label], file: file, line: line)
201+
let message: StaticString = "%@:%llu: Duplicate view label '%@' detected. Use unique labels in .layoutStep() calls"
202+
runtimeWarning(message, [String(describing: file), UInt64(line), label], file: file, line: line)
203203
}
204204
viewLabels.insert(label)
205205
}

0 commit comments

Comments
 (0)