LazLogger: added missing stackdump with log-group

This commit is contained in:
Martin 2022-05-12 02:01:06 +02:00
parent e7f787f78d
commit a68a32a9b5
4 changed files with 28 additions and 0 deletions

View File

@ -625,6 +625,14 @@ begin
{$ENDIF}
end;
procedure DumpExceptionBackTrace(LogEnabled: TLazLoggerLogEnabled);
begin
{$IFnDEF USED_BY_LAZLOGGER_DUMMY}
DebugLogger.DebugLn(' Stack trace:');
DebugLogger.DumpExceptionBackTrace(LogEnabled);
{$ENDIF}
end;
{$IFDEF USED_BY_LAZLOGGER_DUMMY}
operator := (g: PLazLoggerLogGroup): TLazLoggerLogEnabled;
begin

View File

@ -116,6 +116,7 @@ function dbgMemRange(P: Pointer; Count: integer; Width: integer = 0): string; ov
function dbgMemStream(MemStream: TCustomMemoryStream; Count: integer): string; overload;
procedure DumpExceptionBackTrace;
procedure DumpExceptionBackTrace(LogEnabled: TLazLoggerLogEnabled);
operator := (g: PLazLoggerLogGroup): TLazLoggerLogEnabled;
operator := (g: Boolean): TLazLoggerLogEnabled;

View File

@ -247,6 +247,7 @@ type
const s16: string = ''; const s17: string = ''; const s18: string = ''); overload;
procedure DumpExceptionBackTrace;
procedure DumpExceptionBackTrace(LogEnabled: TLazLoggerLogEnabled);
end;
{ TLazLoggerWithGroupParam
@ -711,6 +712,12 @@ begin
DumpAddr(Frames[FrameNumber]);
end;
procedure TLazLogger.DumpExceptionBackTrace(LogEnabled: TLazLoggerLogEnabled);
begin
if not LogEnabled.Enabled then exit;
DumpExceptionBackTrace;
end;
procedure TLazLogger.DoFinish;
begin
//

View File

@ -193,6 +193,8 @@ type
const {%H-}s13: string = ''; const {%H-}s14: string = ''; const {%H-}s15: string = '';
const {%H-}s16: string = ''; const {%H-}s17: string = ''; const {%H-}s18: string = ''); overload;
procedure DumpExceptionBackTrace;
procedure DumpExceptionBackTrace(LogEnabled: TLazLoggerLogEnabled);
end;
@ -534,6 +536,16 @@ begin
end;
procedure TLazLogger.DumpExceptionBackTrace;
begin
end;
procedure TLazLogger.DumpExceptionBackTrace(LogEnabled: TLazLoggerLogEnabled);
begin
end;
{ TLazLoggerLogGroupList }
function TLazLoggerLogGroupList.GetItem(Index: Integer): PLazLoggerLogGroup;