an EFileNotFoundException is raised in procedure TLoggerProFileAppenderBase.RetryMove.
The simplest solution for me would be to either assert that the value is at least one or set it to Min(1, ...) in the constructor. I consider no rotation an invalid use case :)
So either:
constructor TLoggerProFileAppenderBase.Create(...
begin
Assert(aMaxBackupFileCount > 0, 'Log rotation must be at least one.');
...
or
constructor TLoggerProFileAppenderBase.Create(...
begin
...
fMaxBackupFileCount:= Min(1, aMaxBackupFileCount)
...
54 triggered my memory. During testing loggerpro, I came across the following problem: If you set the log rotation to zero, like
in LoggerPro.Config in the file appender example
an
EFileNotFoundException
is raised in procedureTLoggerProFileAppenderBase.RetryMove
.The simplest solution for me would be to either assert that the value is at least one or set it to Min(1, ...) in the constructor. I consider no rotation an invalid use case :)
So either:
or