Hello,
i think there is a bug in TraceObjectWithTag/LogObjectWithTag, the ATag is not evaluated
procedure TCnDebugger.TraceObjectWithTag(AObject: TObject;
const ATag: string);
{$IFNDEF NDEBUG}
var
List: TStringList;
Intfs: string;
{$ENDIF}
begin
{$IFNDEF NDEBUG}
List := nil;
try
List := TStringList.Create;
try
AddObjectToStringList(AObject, List, 0);
Intfs := FormatObjectInterface(AObject);
if Intfs <> '' then
begin
List.Add('Supports Interfaces:');
List.Add(Intfs);
end;
except
List.Add(SCnObjException);
end;
TraceMsgWithType('Object: ' + IntToHex(Integer(AObject), CN_HEX_DIGITS) + SCnCRLF +
List.Text, cmtObject);
finally
List.Free;
end;
{$ENDIF}
end;
i think the new code is
procedure TCnDebugger.TraceObjectWithTag(AObject: TObject;
const ATag: string);
{$IFNDEF NDEBUG}
var
List: TStringList;
Intfs: string;
{$ENDIF}
begin
{$IFNDEF NDEBUG}
List := nil;
try
List := TStringList.Create;
try
AddObjectToStringList(AObject, List, 0);
Intfs := FormatObjectInterface(AObject);
if Intfs <> '' then
begin
List.Add('Supports Interfaces:');
List.Add(Intfs);
end;
except
List.Add(SCnObjException);
end;
TraceMsgWithTypeTag('Object: ' + IntToHex(Integer(AObject), CN_HEX_DIGITS) + SCnCRLF +
List.Text, cmtObject, ATag); // <----- here
finally
List.Free;
end;
{$ENDIF}
end;