core: Log failures to connect trace source
This commit is contained in:
committed by
Tommaso Pecorella
parent
e05447e04a
commit
df984cf4b0
@@ -326,6 +326,7 @@ ObjectBase::TraceConnectWithoutContext(std::string name, const CallbackBase& cb)
|
||||
Ptr<const TraceSourceAccessor> accessor = tid.LookupTraceSourceByName(name);
|
||||
if (!accessor)
|
||||
{
|
||||
NS_LOG_DEBUG("Cannot connect trace " << name << " on object of type " << tid.GetName());
|
||||
return false;
|
||||
}
|
||||
bool ok = accessor->ConnectWithoutContext(this, cb);
|
||||
@@ -340,6 +341,7 @@ ObjectBase::TraceConnect(std::string name, std::string context, const CallbackBa
|
||||
Ptr<const TraceSourceAccessor> accessor = tid.LookupTraceSourceByName(name);
|
||||
if (!accessor)
|
||||
{
|
||||
NS_LOG_DEBUG("Cannot connect trace " << name << " on object of type " << tid.GetName());
|
||||
return false;
|
||||
}
|
||||
bool ok = accessor->Connect(this, context, cb);
|
||||
|
||||
Reference in New Issue
Block a user