#1 2021-08-31 10:21:50

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

mORMOT 2 Exceptions in LogTrailer on sllError

Hi Arnaud

i found the following "bug" between DEBUG and RELEASE Version in mORMot2:

I get lot's of Exception (> 200) at this line of code:

mORMot.rest.client: 2460 (InternalLog('% % returned % (%) with message  %',  [method, url, Call.OutStatus, StatusMsg, fLastErrorMessage], sllError);)

only in RELEASE Mode - not in DEBUG Mode !

so it was a bit tricky to get the cause for the Exceptions.

The Source for the Exceptions is in mormot.core.log: AddStackTrace in LogTrailer (sllError is in fLevelStackTrace) around line 5416
your are ignoring the Exceptions but they are displayed in the LogFile - and on console Screen.

As WorkAround i added this piece of code to my "Log Initialisation Code"

{$if defined(RELEASE)}
    TSynLog.Family.LevelStackTrace := TSynLog.Family.LevelStackTrace - [sllError];
{$endif}

There are other Log Levels in LevelStackTrace wich may rise the same Exceptions
May be you have an Idea what's the Problem.
in mORMot the Problem does not exists - but i saw that you did a big rework in TSynLog


Rad Studio 12.1 Santorini

Offline

#2 2021-09-01 12:17:37

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,230
Website

Re: mORMOT 2 Exceptions in LogTrailer on sllError

You are right.

I have now protected the logging methods to ignore any nested exceptions.
It should fix your problem.

Offline

Board footer

Powered by FluxBB