Pushed some members of TLoggerPROFileAppender into protected section

This commit is contained in:
Daniele Teti 2024-05-29 14:26:01 +02:00
parent b6b2a1818e
commit 4d54155bd7
2 changed files with 8 additions and 7 deletions

View File

@ -66,15 +66,15 @@ type
}
TLoggerProFileAppenderBase = class(TLoggerProAppenderBase)
private
procedure RetryMove(const aFileSrc, aFileDest: string);
procedure RetryDelete(const aFileSrc: string);
protected
fEncoding: TEncoding;
fMaxBackupFileCount: Integer;
fMaxFileSizeInKiloByte: Integer;
fLogFileNameFormat: string;
fLogsFolder: string;
fEncoding: TEncoding;
function CreateWriter(const aFileName: string): TStreamWriter;
procedure RetryMove(const aFileSrc, aFileDest: string);
procedure RetryDelete(const aFileSrc: string);
protected
function CreateWriter(const aFileName: string; const aBufferSize: Integer = 32): TStreamWriter;
procedure CheckLogFileNameFormat(const LogFileNameFormat: String); virtual;
procedure EmitStartRotateLogItem(aWriter: TStreamWriter); virtual;
procedure EmitEndRotateLogItem(aWriter: TStreamWriter); virtual;
@ -366,7 +366,7 @@ begin
fEncoding := TEncoding.DEFAULT;
end;
function TLoggerProFileAppenderBase.CreateWriter(const aFileName: string): TStreamWriter;
function TLoggerProFileAppenderBase.CreateWriter(const aFileName: string; const aBufferSize: Integer = 32): TStreamWriter;
var
lFileStream: TFileStream;
lFileAccessMode: Word;
@ -387,7 +387,7 @@ begin
lFileStream := TFileStream.Create(aFileName, lFileAccessMode);
try
lFileStream.Seek(0, TSeekOrigin.soEnd);
Result := TStreamWriter.Create(lFileStream, fEncoding, 32);
Result := TStreamWriter.Create(lFileStream, fEncoding, aBufferSize);
Result.AutoFlush := true;
Result.OwnStream;
Break;

View File

@ -1024,6 +1024,7 @@
<Platforms>
<Platform value="Android">False</Platform>
<Platform value="Android64">False</Platform>
<Platform value="Linux64">False</Platform>
<Platform value="Win32">True</Platform>
<Platform value="Win64">False</Platform>
</Platforms>