#1 2025-05-16 08:27:39

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 555

regression in logging

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

#2 2025-05-16 08:41:46

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 555

Re: regression in logging

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

#3 2025-06-03 15:21:38

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,069
Website

Re: regression in logging

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.

Offline

#4 2025-06-10 11:50:40

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 555

Re: regression in logging

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

#5 2025-06-10 16:43:59

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,069
Website

Re: regression in logging

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.

Offline

#6 2025-06-24 19:11:23

itSDS
Member
From: Germany
Registered: 2014-04-24
Posts: 555

Re: regression in logging

Ty Arnaud it solves my problem


Rad Studio 12.3 Athens / 13.0 Ganymede

Offline

Board footer

Powered by FluxBB