Skip to content

Commit 3584ad1

Browse files
committed
Improve logging (NFC)
1 parent dee589f commit 3584ad1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lldb/source/Plugins/LanguageRuntime/Swift/ReflectionContext.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class TargetReflectionContext : public ReflectionContextInterface {
132132
const swift::reflection::TypeRef *type_ref =
133133
GetTypeRefOrNull(dem, node, descriptor_finder);
134134
if (!type_ref)
135-
LLDB_LOG(GetLog(LLDBLog::Types), "Could not find typeref for type: {0}",
135+
LLDB_LOG(GetLog(LLDBLog::Types), "Could not find typeref for type {0}",
136136
mangled_type_name);
137137
return type_ref;
138138
}
@@ -197,8 +197,9 @@ class TargetReflectionContext : public ReflectionContextInterface {
197197
std::stringstream ss;
198198
type_ref->dump(ss);
199199
LLDB_LOG(log,
200-
"[TargetReflectionContext::getTypeInfo] Getting "
201-
"type info for typeref:\n{0}", ss.str());
200+
"[TargetReflectionContext[{0:x}]::getTypeInfo] Getting type "
201+
"info for typeref {1}",
202+
provider ? provider->getId() : 0, ss.str());
202203
}
203204

204205
auto type_info = m_reflection_ctx.getTypeInfo(type_ref, provider);
@@ -207,7 +208,7 @@ class TargetReflectionContext : public ReflectionContextInterface {
207208
type_ref->dump(ss);
208209
LLDB_LOG(log,
209210
"[TargetReflectionContext::getTypeInfo] Could not get "
210-
"type info for typeref:\n{0}",
211+
"type info for typeref {0}",
211212
ss.str());
212213
}
213214

@@ -216,8 +217,8 @@ class TargetReflectionContext : public ReflectionContextInterface {
216217
type_info->dump(ss);
217218
LLDB_LOG(log,
218219
"[TargetReflectionContext::getTypeInfo] Found "
219-
"type info:\n{0}",
220-
ss.str());
220+
"type info {0}",
221+
ss.str());
221222
}
222223
return type_info;
223224
}

0 commit comments

Comments
 (0)