You are not logged in.
Pages: 1
Hi Arnaud,
today i saw that some SOA Parameters i formerly could read are shortened now.
There was a const MAX_SIZE_RESPONSE_LOG which i changed to a larger Value
now this const is not used any more and at the places it was formerly used InternalLogResponse is called!
InterlogResponse uses LogEscape which uses a ShortString now an cuts all after 200 Char.
This is not very useful.
Last edited by itSDS (2025-05-16 08:30:20)
Rad Studio 12.3 Athens / 13.0 Ganymede
Offline
As Workaround i changed:
procedure TRest.InternalLogResponse(const aContent: RawByteString;
const aContext: shortstring; Level: TSynLogLevel);
begin // caller checked that self<>nil and sllServiceReturn in fLogLevel
// fLogFamily.Add.LogEscape(Level, '%', [aContext], pointer(aContent), length(aContent), self);
fLogFamily.Add.Log(Level, aContent, self, MAX_SIZE_RESPONSE_LOG);
end;
Rad Studio 12.3 Athens / 13.0 Ganymede
Offline
Using this method may not be a good idea, if aContent is not UTF-8 encoded.
I have enhanced the LogEscape() method to handle up to 4KB:
https://github.com/synopse/mORMot2/commit/e264fd0b6
And introducing a new TRest.LogResponseMaxBytes parameter:
https://github.com/synopse/mORMot2/commit/2e30db60b
Sorry for the late reaction.
Online
Hi Arnaud, ty for your patch.
Today we wanted to see the Result of a SOA Call in Log. In former Versions there was the complete JSON Array.
In the new m2 there is only 1 line saying Response with 1.7MB
Is it possible to add the complete JSON to Log again. We need it to debug problems. Log Size and Performance does not matter in our case ! More important is to log the Information.
A switch to enable / Disable Big Data would be ok too.
Rad Studio 12.3 Athens / 13.0 Ganymede
Offline
Please try with
https://github.com/synopse/mORMot2/commit/e2b981c3e
and
https://github.com/synopse/mORMot2/commit/55165614a
If you put something big in the TRest.LogResponseMaxBytes parameter, e.g. MaxInt, you would be able to have all the UTF-8 / JSON content added to the log.
Online
Ty Arnaud it solves my problem
Rad Studio 12.3 Athens / 13.0 Ganymede
Offline
Pages: 1