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

GetArchiveFileNamePattern() private method

Gets the pattern that archive files will match
private GetArchiveFileNamePattern ( string fileName, LogEventInfo eventInfo ) : string
fileName string Filename of the log file
eventInfo LogEventInfo Log event that the instance is currently processing.
return string
        private string GetArchiveFileNamePattern(string fileName, LogEventInfo eventInfo)
        {
            if (this.fullArchiveFileName == null)
            {
                string ext = EnableArchiveFileCompression ? ".zip" : Path.GetExtension(fileName);
                return Path.ChangeExtension(fileName, ".{#}" + ext);
            }
            else
            {
                //The archive file name is given. There are two possibilities
                //(1) User supplied the Filename with pattern
                //(2) User supplied the normal filename
                string archiveFileName = this.fullArchiveFileName.Render(eventInfo);
                return archiveFileName;
            }
        }