Skip to content

Commit 02e946c

Browse files
committed
upd(loggerpro): v2.0
1 parent 4aaec9a commit 02e946c

File tree

5 files changed

+476
-61
lines changed

5 files changed

+476
-61
lines changed

lib/loggerpro/LoggerPro.Proxy.pas

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,11 @@ TLogWriterDecorator = class(TInterfacedObject, ILogWriter)
9191
function WithPropertyFmt(const aKey: string; const aFormat: string; const aArgs: array of const): ILogWriter;
9292

9393
function WithDefaultTag(const aTag: string): ILogWriter;
94+
function WithDefaultContext(const aContext: array of LogParam): ILogWriter;
9495

9596
procedure Disable;
9697
procedure Enable;
98+
procedure Shutdown;
9799

98100
{ ICustomLogWriter}
99101
function GetAppendersClassNames: TArray<string>;
@@ -239,6 +241,11 @@ procedure TLogWriterDecorator.Enable;
239241
fDecoratedLogWriter.Enable;
240242
end;
241243

244+
procedure TLogWriterDecorator.Shutdown;
245+
begin
246+
fDecoratedLogWriter.Shutdown;
247+
end;
248+
242249
procedure TLogWriterDecorator.Error(const aMessage: string; const aParams: array of TVarRec; const aTag: string);
243250
begin
244251
Log(TLogType.Error, aMessage, aParams, aTag);
@@ -376,6 +383,11 @@ function TLogWriterDecorator.WithDefaultTag(const aTag: string): ILogWriter;
376383
Result := fDecoratedLogWriter.WithDefaultTag(aTag);
377384
end;
378385

386+
function TLogWriterDecorator.WithDefaultContext(const aContext: array of LogParam): ILogWriter;
387+
begin
388+
Result := fDecoratedLogWriter.WithDefaultContext(aContext);
389+
end;
390+
379391
procedure TLogWriterDecorator.Debug(const aMessage: string);
380392
begin
381393
Debug(aMessage, DEFAULT_LOG_TAG);

0 commit comments

Comments
 (0)