NLog.Targets.FileTarget.GetArchiveFileName C# (CSharp) Method

GetArchiveFileName() private method

Indicates if the automatic archiving process should be executed.
private GetArchiveFileName ( string fileName, LogEventInfo ev, int upcomingWriteSize ) : string
fileName string File name to be written.
ev LogEventInfo Log event that the instance is currently processing.
upcomingWriteSize int The size in bytes of the next chunk of data to be written in the file.
return string
        private string GetArchiveFileName(string fileName, LogEventInfo ev, int upcomingWriteSize)
        {
            var hasFileName = !(fileName == null && previousLogFileName == null);
            if (hasFileName)
            {
                return GetArchiveFileNameBasedOnFileSize(fileName, upcomingWriteSize) ??
                       GetArchiveFileNameBasedOnTime(fileName, ev);
            }

            return null;
        }