Hello group.
I want to introduce a logging layer in front of the Log() method in Inno Setup.
Instead of writing
Log(Format('There was a disturbance of the force on planet %s with strength %d', [planet, strength]));
I would like to have
LogDebug('There was a disturbance of the force on planet %s with strength %d', [planet, strength]);
My declaration of 'LogDebug' looks like this:
procedure LogDebug(const msg: string; const args: array of Variant);
begin
Log(Format(msg, args));
end;
This produces a 'Type Mismatch' error at runtime in the Format() call. As Format() offers the same functionality, can someone tell me how the correct type declaration for the array must like like?
I also tried
procedure LogDebug(const msg: string; const args: array of const);
adopting the declaration of Format() in the docs. But that doesn’t even compile.
I want to introduce a logging layer in front of the Log() method in Inno Setup.
Instead of writing
Log(Format('There was a disturbance of the force on planet %s with strength %d', [planet, strength]));
I would like to have
LogDebug('There was a disturbance of the force on planet %s with strength %d', [planet, strength]);
...