mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-08 22:18:17 +02:00
LazLogger: added new event, to change log-text
This commit is contained in:
parent
046c88b119
commit
34053f3e32
@ -20,6 +20,7 @@ uses
|
|||||||
type
|
type
|
||||||
|
|
||||||
PLazLoggerLogGroup = LazLoggerBase.PLazLoggerLogGroup;
|
PLazLoggerLogGroup = LazLoggerBase.PLazLoggerLogGroup;
|
||||||
|
TLazLoggerWriteExEventInfo = LazLoggerBase.TLazLoggerWriteExEventInfo;
|
||||||
|
|
||||||
{$DEFINE USED_BY_LAZLOGGER}
|
{$DEFINE USED_BY_LAZLOGGER}
|
||||||
{$I LazLoggerIntf.inc}
|
{$I LazLoggerIntf.inc}
|
||||||
@ -118,6 +119,8 @@ type
|
|||||||
FFileHandle: TLazLoggerFileHandle;
|
FFileHandle: TLazLoggerFileHandle;
|
||||||
FOnDbgOut: TLazLoggerWriteEvent;
|
FOnDbgOut: TLazLoggerWriteEvent;
|
||||||
FOnDebugLn: TLazLoggerWriteEvent;
|
FOnDebugLn: TLazLoggerWriteEvent;
|
||||||
|
FOnDbgOutEx: TLazLoggerWriteExEvent;
|
||||||
|
FOnDebugLnEx: TLazLoggerWriteExEvent;
|
||||||
FBlockHandler: TList;
|
FBlockHandler: TList;
|
||||||
|
|
||||||
|
|
||||||
@ -159,9 +162,9 @@ type
|
|||||||
procedure ClearAllBlockHandler;
|
procedure ClearAllBlockHandler;
|
||||||
|
|
||||||
|
|
||||||
procedure DoDbgOut(s: string); override;
|
procedure DoDbgOut(s: string; AGroup: PLazLoggerLogGroup = nil); override;
|
||||||
procedure DoDebugLn(s: string); override;
|
procedure DoDebugLn(s: string; AGroup: PLazLoggerLogGroup = nil); override;
|
||||||
procedure DoDebuglnStack(const s: string); override;
|
procedure DoDebuglnStack(const s: string; AGroup: PLazLoggerLogGroup = nil); override;
|
||||||
|
|
||||||
property FileHandle: TLazLoggerFileHandle read GetFileHandle write SetFileHandle;
|
property FileHandle: TLazLoggerFileHandle read GetFileHandle write SetFileHandle;
|
||||||
public
|
public
|
||||||
@ -179,6 +182,8 @@ type
|
|||||||
|
|
||||||
property OnDebugLn: TLazLoggerWriteEvent read FOnDebugLn write FOnDebugLn;
|
property OnDebugLn: TLazLoggerWriteEvent read FOnDebugLn write FOnDebugLn;
|
||||||
property OnDbgOut: TLazLoggerWriteEvent read FOnDbgOut write FOnDbgOut;
|
property OnDbgOut: TLazLoggerWriteEvent read FOnDbgOut write FOnDbgOut;
|
||||||
|
property OnDebugLnEx: TLazLoggerWriteExEvent read FOnDebugLnEx write FOnDebugLnEx;
|
||||||
|
property OnDbgOutEx: TLazLoggerWriteExEvent read FOnDbgOutEx write FOnDbgOutEx;
|
||||||
|
|
||||||
procedure AddBlockHandler(AHandler: TLazLoggerBlockHandler); override;
|
procedure AddBlockHandler(AHandler: TLazLoggerBlockHandler); override;
|
||||||
procedure RemoveBlockHandler(AHandler: TLazLoggerBlockHandler); override;
|
procedure RemoveBlockHandler(AHandler: TLazLoggerBlockHandler); override;
|
||||||
@ -721,10 +726,13 @@ begin
|
|||||||
while BlockHandlerCount > 0 do RemoveBlockHandler(BlockHandler[0]);
|
while BlockHandlerCount > 0 do RemoveBlockHandler(BlockHandler[0]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLoggerFile.DoDbgOut(s: string);
|
procedure TLazLoggerFile.DoDbgOut(s: string; AGroup: PLazLoggerLogGroup);
|
||||||
var
|
var
|
||||||
Handled: Boolean;
|
Indent: String;
|
||||||
|
Handled, AtBOL: Boolean;
|
||||||
CB: TLazLoggerWriteEvent;
|
CB: TLazLoggerWriteEvent;
|
||||||
|
CB2: TLazLoggerWriteExEvent;
|
||||||
|
CbInfo: TLazLoggerWriteExEventInfo;
|
||||||
begin
|
begin
|
||||||
if not IsInitialized then Init;
|
if not IsInitialized then Init;
|
||||||
|
|
||||||
@ -734,11 +742,26 @@ begin
|
|||||||
dirty reads should therefore yield the correct value: "true"
|
dirty reads should therefore yield the correct value: "true"
|
||||||
*)
|
*)
|
||||||
|
|
||||||
if s <> '' then begin
|
|
||||||
if FDebugNestAtBOL then begin
|
|
||||||
EnterCriticalsection(FIndentCriticalSection);
|
EnterCriticalsection(FIndentCriticalSection);
|
||||||
s := FDebugIndent + s;
|
Indent := FDebugIndent;
|
||||||
LeaveCriticalsection(FIndentCriticalSection);
|
LeaveCriticalsection(FIndentCriticalSection);
|
||||||
|
|
||||||
|
AtBOL := FDebugNestAtBOL;
|
||||||
|
|
||||||
|
CB2 := OnDbgOutEx;
|
||||||
|
if CB2 <> nil then
|
||||||
|
begin
|
||||||
|
Handled := False;
|
||||||
|
CbInfo.Group := AGroup;
|
||||||
|
CbInfo.DbgOutAtBOL := AtBOL;
|
||||||
|
CB2(Self, s, Indent, Handled, CbInfo);
|
||||||
|
if Handled then
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if s <> '' then begin
|
||||||
|
if AtBOL then begin
|
||||||
|
s := Indent + s;
|
||||||
end;
|
end;
|
||||||
FDebugNestAtBOL := (s[length(s)] in [#10,#13]);
|
FDebugNestAtBOL := (s[length(s)] in [#10,#13]);
|
||||||
end;
|
end;
|
||||||
@ -755,17 +778,35 @@ begin
|
|||||||
FileHandle.WriteToFile(s, Self);
|
FileHandle.WriteToFile(s, Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLoggerFile.DoDebugLn(s: string);
|
procedure TLazLoggerFile.DoDebugLn(s: string; AGroup: PLazLoggerLogGroup);
|
||||||
var
|
var
|
||||||
Handled: Boolean;
|
Indent: String;
|
||||||
|
Handled, AtBOL: Boolean;
|
||||||
CB: TLazLoggerWriteEvent;
|
CB: TLazLoggerWriteEvent;
|
||||||
|
CB2: TLazLoggerWriteExEvent;
|
||||||
|
CbInfo: TLazLoggerWriteExEventInfo;
|
||||||
begin
|
begin
|
||||||
if not IsInitialized then Init;
|
if not IsInitialized then Init;
|
||||||
|
|
||||||
if FDebugNestAtBOL and (s <> '') then begin
|
|
||||||
EnterCriticalsection(FIndentCriticalSection);
|
EnterCriticalsection(FIndentCriticalSection);
|
||||||
s := FDebugIndent + s;
|
Indent := FDebugIndent;
|
||||||
LeaveCriticalsection(FIndentCriticalSection);
|
LeaveCriticalsection(FIndentCriticalSection);
|
||||||
|
|
||||||
|
AtBOL := FDebugNestAtBOL;
|
||||||
|
|
||||||
|
CB2 := OnDebugLnEx;
|
||||||
|
if CB2 <> nil then
|
||||||
|
begin
|
||||||
|
Handled := False;
|
||||||
|
CbInfo.Group := AGroup;
|
||||||
|
CbInfo.DbgOutAtBOL := AtBOL;
|
||||||
|
CB2(Self, s, Indent, Handled, CbInfo);
|
||||||
|
if Handled then
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
if AtBOL and (s <> '') then begin
|
||||||
|
s := Indent + s;
|
||||||
end;
|
end;
|
||||||
FDebugNestAtBOL := True;
|
FDebugNestAtBOL := True;
|
||||||
|
|
||||||
@ -781,7 +822,8 @@ begin
|
|||||||
FileHandle.WriteLnToFile(LineBreaksToSystemLineBreaks(s), Self);
|
FileHandle.WriteLnToFile(LineBreaksToSystemLineBreaks(s), Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLoggerFile.DoDebuglnStack(const s: string);
|
procedure TLazLoggerFile.DoDebuglnStack(const s: string;
|
||||||
|
AGroup: PLazLoggerLogGroup);
|
||||||
begin
|
begin
|
||||||
DebugLn(s);
|
DebugLn(s);
|
||||||
FileHandle.DoOpenFile;
|
FileHandle.DoOpenFile;
|
||||||
@ -823,7 +865,9 @@ begin
|
|||||||
inherited Assign(Src);
|
inherited Assign(Src);
|
||||||
if Src is TLazLoggerFile then begin
|
if Src is TLazLoggerFile then begin
|
||||||
FOnDbgOut := TLazLoggerFile(Src).FOnDbgOut;
|
FOnDbgOut := TLazLoggerFile(Src).FOnDbgOut;
|
||||||
FOnDebugLn := TLazLoggerFile(Src).FOnDebugLn;;
|
FOnDebugLn := TLazLoggerFile(Src).FOnDebugLn;
|
||||||
|
FOnDbgOutEx := TLazLoggerFile(Src).FOnDbgOutEx;
|
||||||
|
FOnDebugLnEx := TLazLoggerFile(Src).FOnDebugLnEx;
|
||||||
|
|
||||||
FEnvironmentForLogFileName := TLazLoggerFile(Src).FEnvironmentForLogFileName;
|
FEnvironmentForLogFileName := TLazLoggerFile(Src).FEnvironmentForLogFileName;
|
||||||
FParamForLogFileName := TLazLoggerFile(Src).FParamForLogFileName;
|
FParamForLogFileName := TLazLoggerFile(Src).FParamForLogFileName;
|
||||||
|
@ -52,7 +52,14 @@ type
|
|||||||
lwtTextFile // Data will be ^Text
|
lwtTextFile // Data will be ^Text
|
||||||
);
|
);
|
||||||
|
|
||||||
|
TLazLoggerWriteExEventInfo = record
|
||||||
|
Group: PLazLoggerLogGroup; // if only one group / remember nestlevel count
|
||||||
|
DbgOutAtBOL: Boolean; // Only for DbgOut, True if first segment in new line
|
||||||
|
end;
|
||||||
|
|
||||||
TLazLoggerWriteEvent = procedure(Sender: TObject; S: string; var Handled: Boolean) of object;
|
TLazLoggerWriteEvent = procedure(Sender: TObject; S: string; var Handled: Boolean) of object;
|
||||||
|
TLazLoggerWriteExEvent = procedure(Sender: TObject; var LogTxt, LogIndent: string; var Handled: Boolean; AnInfo: TLazLoggerWriteExEventInfo) of object;
|
||||||
|
|
||||||
TLazLoggerWidgetSetWriteEvent = procedure(Sender: TObject;
|
TLazLoggerWidgetSetWriteEvent = procedure(Sender: TObject;
|
||||||
S: string;
|
S: string;
|
||||||
var Handled: Boolean;
|
var Handled: Boolean;
|
||||||
@ -127,9 +134,9 @@ type
|
|||||||
procedure IndentChanged; virtual;
|
procedure IndentChanged; virtual;
|
||||||
function GetBlockHandler({%H-}AIndex: Integer): TLazLoggerBlockHandler; virtual;
|
function GetBlockHandler({%H-}AIndex: Integer): TLazLoggerBlockHandler; virtual;
|
||||||
|
|
||||||
procedure DoDbgOut({%H-}s: string); virtual;
|
procedure DoDbgOut({%H-}s: string; AGroup: PLazLoggerLogGroup = nil); virtual;
|
||||||
procedure DoDebugLn({%H-}s: string); virtual;
|
procedure DoDebugLn({%H-}s: string; AGroup: PLazLoggerLogGroup = nil); virtual;
|
||||||
procedure DoDebuglnStack(const {%H-}s: string); virtual;
|
procedure DoDebuglnStack(const {%H-}s: string; AGroup: PLazLoggerLogGroup = nil); virtual;
|
||||||
|
|
||||||
function ArgsToString(Args: array of const): string;
|
function ArgsToString(Args: array of const): string;
|
||||||
property IsInitialized: Boolean read FIsInitialized;
|
property IsInitialized: Boolean read FIsInitialized;
|
||||||
@ -728,7 +735,8 @@ begin
|
|||||||
DoFinish;
|
DoFinish;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DoDebuglnStack(const s: string);
|
procedure TLazLogger.DoDebuglnStack(const s: string; AGroup: PLazLoggerLogGroup
|
||||||
|
);
|
||||||
begin
|
begin
|
||||||
//
|
//
|
||||||
end;
|
end;
|
||||||
@ -758,12 +766,12 @@ begin
|
|||||||
//
|
//
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DoDbgOut(s: string);
|
procedure TLazLogger.DoDbgOut(s: string; AGroup: PLazLoggerLogGroup);
|
||||||
begin
|
begin
|
||||||
//
|
//
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DoDebugLn(s: string);
|
procedure TLazLogger.DoDebugLn(s: string; AGroup: PLazLoggerLogGroup);
|
||||||
begin
|
begin
|
||||||
//
|
//
|
||||||
end;
|
end;
|
||||||
@ -1025,26 +1033,26 @@ end;
|
|||||||
procedure TLazLogger.DebuglnStack(LogEnabled: TLazLoggerLogEnabled; const s: string);
|
procedure TLazLogger.DebuglnStack(LogEnabled: TLazLoggerLogEnabled; const s: string);
|
||||||
begin
|
begin
|
||||||
if not LogEnabled.Enabled then exit;
|
if not LogEnabled.Enabled then exit;
|
||||||
DebuglnStack(s);
|
DoDebuglnStack(s, LogEnabled.Group);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DbgOut(LogEnabled: TLazLoggerLogEnabled; const s: string);
|
procedure TLazLogger.DbgOut(LogEnabled: TLazLoggerLogEnabled; const s: string);
|
||||||
begin
|
begin
|
||||||
if not LogEnabled.Enabled then exit;
|
if not LogEnabled.Enabled then exit;
|
||||||
DoDbgOut(s);
|
DoDbgOut(s, LogEnabled.Group);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DbgOut(LogEnabled: TLazLoggerLogEnabled; Args: array of const);
|
procedure TLazLogger.DbgOut(LogEnabled: TLazLoggerLogEnabled; Args: array of const);
|
||||||
begin
|
begin
|
||||||
if not LogEnabled.Enabled then exit;
|
if not LogEnabled.Enabled then exit;
|
||||||
DoDbgOut(ArgsToString(Args));
|
DoDbgOut(ArgsToString(Args), LogEnabled.Group);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DbgOut(LogEnabled: TLazLoggerLogEnabled; const S: String;
|
procedure TLazLogger.DbgOut(LogEnabled: TLazLoggerLogEnabled; const S: String;
|
||||||
Args: array of const);
|
Args: array of const);
|
||||||
begin
|
begin
|
||||||
if not LogEnabled.Enabled then exit;
|
if not LogEnabled.Enabled then exit;
|
||||||
DoDbgOut(Format(S, Args));
|
DoDbgOut(Format(S, Args), LogEnabled.Group);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DbgOut(LogEnabled: TLazLoggerLogEnabled; const s1, s2: string;
|
procedure TLazLogger.DbgOut(LogEnabled: TLazLoggerLogEnabled; const s1, s2: string;
|
||||||
@ -1054,26 +1062,26 @@ procedure TLazLogger.DbgOut(LogEnabled: TLazLoggerLogEnabled; const s1, s2: stri
|
|||||||
const s17: string; const s18: string);
|
const s17: string; const s18: string);
|
||||||
begin
|
begin
|
||||||
if not LogEnabled.Enabled then exit;
|
if not LogEnabled.Enabled then exit;
|
||||||
DoDbgOut(s1+s2+s3+s4+s5+s6+s7+s8+s9+s10+s11+s12+s13+s14+s15+s16+s17+s18);
|
DoDbgOut(s1+s2+s3+s4+s5+s6+s7+s8+s9+s10+s11+s12+s13+s14+s15+s16+s17+s18, LogEnabled.Group);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DebugLn(LogEnabled: TLazLoggerLogEnabled; const s: string);
|
procedure TLazLogger.DebugLn(LogEnabled: TLazLoggerLogEnabled; const s: string);
|
||||||
begin
|
begin
|
||||||
if not LogEnabled.Enabled then exit;
|
if not LogEnabled.Enabled then exit;
|
||||||
DoDebugLn(s);
|
DoDebugLn(s, LogEnabled.Group);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DebugLn(LogEnabled: TLazLoggerLogEnabled; Args: array of const);
|
procedure TLazLogger.DebugLn(LogEnabled: TLazLoggerLogEnabled; Args: array of const);
|
||||||
begin
|
begin
|
||||||
if not LogEnabled.Enabled then exit;
|
if not LogEnabled.Enabled then exit;
|
||||||
DoDebugLn(ArgsToString(Args));
|
DoDebugLn(ArgsToString(Args), LogEnabled.Group);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DebugLn(LogEnabled: TLazLoggerLogEnabled; const S: String;
|
procedure TLazLogger.DebugLn(LogEnabled: TLazLoggerLogEnabled; const S: String;
|
||||||
Args: array of const);
|
Args: array of const);
|
||||||
begin
|
begin
|
||||||
if not LogEnabled.Enabled then exit;
|
if not LogEnabled.Enabled then exit;
|
||||||
DoDebugLn(Format(S, Args));
|
DoDebugLn(Format(S, Args), LogEnabled.Group);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DebugLn(LogEnabled: TLazLoggerLogEnabled; const s1, s2: string;
|
procedure TLazLogger.DebugLn(LogEnabled: TLazLoggerLogEnabled; const s1, s2: string;
|
||||||
@ -1083,7 +1091,7 @@ procedure TLazLogger.DebugLn(LogEnabled: TLazLoggerLogEnabled; const s1, s2: str
|
|||||||
const s17: string; const s18: string);
|
const s17: string; const s18: string);
|
||||||
begin
|
begin
|
||||||
if not LogEnabled.Enabled then exit;
|
if not LogEnabled.Enabled then exit;
|
||||||
DoDebugLn(s1+s2+s3+s4+s5+s6+s7+s8+s9+s10+s11+s12+s13+s14+s15+s16+s17+s18);
|
DoDebugLn(s1+s2+s3+s4+s5+s6+s7+s8+s9+s10+s11+s12+s13+s14+s15+s16+s17+s18, LogEnabled.Group);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DebugLnEnter(LogEnabled: TLazLoggerLogEnabled);
|
procedure TLazLogger.DebugLnEnter(LogEnabled: TLazLoggerLogEnabled);
|
||||||
@ -1094,14 +1102,14 @@ end;
|
|||||||
procedure TLazLogger.DebugLnEnter(LogEnabled: TLazLoggerLogEnabled; const s: string);
|
procedure TLazLogger.DebugLnEnter(LogEnabled: TLazLoggerLogEnabled; const s: string);
|
||||||
begin
|
begin
|
||||||
if LogEnabled.Enabled then
|
if LogEnabled.Enabled then
|
||||||
DoDebugLn(s);
|
DoDebugLn(s, LogEnabled.Group);
|
||||||
IncreaseIndent(LogEnabled);
|
IncreaseIndent(LogEnabled);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DebugLnEnter(LogEnabled: TLazLoggerLogEnabled; Args: array of const);
|
procedure TLazLogger.DebugLnEnter(LogEnabled: TLazLoggerLogEnabled; Args: array of const);
|
||||||
begin
|
begin
|
||||||
if LogEnabled.Enabled then
|
if LogEnabled.Enabled then
|
||||||
DoDebugLn(ArgsToString(Args));
|
DoDebugLn(ArgsToString(Args), LogEnabled.Group);
|
||||||
IncreaseIndent(LogEnabled);
|
IncreaseIndent(LogEnabled);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1109,7 +1117,7 @@ procedure TLazLogger.DebugLnEnter(LogEnabled: TLazLoggerLogEnabled; s: string;
|
|||||||
Args: array of const);
|
Args: array of const);
|
||||||
begin
|
begin
|
||||||
if LogEnabled.Enabled then
|
if LogEnabled.Enabled then
|
||||||
DoDebugLn(Format(S, Args));
|
DoDebugLn(Format(S, Args), LogEnabled.Group);
|
||||||
IncreaseIndent(LogEnabled);
|
IncreaseIndent(LogEnabled);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1120,7 +1128,7 @@ procedure TLazLogger.DebugLnEnter(LogEnabled: TLazLoggerLogEnabled; const s1, s2
|
|||||||
const s17: string; const s18: string);
|
const s17: string; const s18: string);
|
||||||
begin
|
begin
|
||||||
if LogEnabled.Enabled then
|
if LogEnabled.Enabled then
|
||||||
DoDebugLn(s1+s2+s3+s4+s5+s6+s7+s8+s9+s10+s11+s12+s13+s14+s15+s16+s17+s18);
|
DoDebugLn(s1+s2+s3+s4+s5+s6+s7+s8+s9+s10+s11+s12+s13+s14+s15+s16+s17+s18, LogEnabled.Group);
|
||||||
IncreaseIndent(LogEnabled);
|
IncreaseIndent(LogEnabled);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1133,14 +1141,14 @@ procedure TLazLogger.DebugLnExit(LogEnabled: TLazLoggerLogEnabled; const s: stri
|
|||||||
begin
|
begin
|
||||||
DecreaseIndent(LogEnabled);
|
DecreaseIndent(LogEnabled);
|
||||||
if not LogEnabled.Enabled then exit;
|
if not LogEnabled.Enabled then exit;
|
||||||
DoDebugLn(s);
|
DoDebugLn(s, LogEnabled.Group);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DebugLnExit(LogEnabled: TLazLoggerLogEnabled; Args: array of const);
|
procedure TLazLogger.DebugLnExit(LogEnabled: TLazLoggerLogEnabled; Args: array of const);
|
||||||
begin
|
begin
|
||||||
DecreaseIndent(LogEnabled);
|
DecreaseIndent(LogEnabled);
|
||||||
if not LogEnabled.Enabled then exit;
|
if not LogEnabled.Enabled then exit;
|
||||||
DoDebugLn(ArgsToString(Args));
|
DoDebugLn(ArgsToString(Args), LogEnabled.Group);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DebugLnExit(LogEnabled: TLazLoggerLogEnabled; s: string;
|
procedure TLazLogger.DebugLnExit(LogEnabled: TLazLoggerLogEnabled; s: string;
|
||||||
@ -1148,7 +1156,7 @@ procedure TLazLogger.DebugLnExit(LogEnabled: TLazLoggerLogEnabled; s: string;
|
|||||||
begin
|
begin
|
||||||
DecreaseIndent(LogEnabled);
|
DecreaseIndent(LogEnabled);
|
||||||
if not LogEnabled.Enabled then exit;
|
if not LogEnabled.Enabled then exit;
|
||||||
DoDebugLn(Format(S, Args));
|
DoDebugLn(Format(S, Args), LogEnabled.Group);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazLogger.DebugLnExit(LogEnabled: TLazLoggerLogEnabled; const s1, s2: string;
|
procedure TLazLogger.DebugLnExit(LogEnabled: TLazLoggerLogEnabled; const s1, s2: string;
|
||||||
@ -1159,7 +1167,7 @@ procedure TLazLogger.DebugLnExit(LogEnabled: TLazLoggerLogEnabled; const s1, s2:
|
|||||||
begin
|
begin
|
||||||
DecreaseIndent(LogEnabled);
|
DecreaseIndent(LogEnabled);
|
||||||
if not LogEnabled.Enabled then exit;
|
if not LogEnabled.Enabled then exit;
|
||||||
DoDebugLn(s1+s2+s3+s4+s5+s6+s7+s8+s9+s10+s11+s12+s13+s14+s15+s16+s17+s18);
|
DoDebugLn(s1+s2+s3+s4+s5+s6+s7+s8+s9+s10+s11+s12+s13+s14+s15+s16+s17+s18, LogEnabled.Group);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TLazLoggerWithGroupParam }
|
{ TLazLoggerWithGroupParam }
|
||||||
|
Loading…
Reference in New Issue
Block a user