public override void ActivateOptions()

in src/log4net/Appender/RollingFileAppender.cs [978:1029]


  public override void ActivateOptions()
  {
    if (_rollDate && DatePattern is not null)
    {
      _now = DateTimeStrategy.Now;
      _rollPoint = ComputeCheckPeriod(DatePattern);

      if (_rollPoint == RollPoint.InvalidRollPoint)
      {
        throw new ArgumentException($"Invalid RollPoint, unable to parse [{DatePattern}]");
      }

      // next line added as this removes the name check in rollOver
      _nextCheck = NextCheckDate(_now, _rollPoint);
    }
    else
    {
      if (_rollDate)
      {
        ErrorHandler.Error($"Either DatePattern or rollingStyle options are not set for [{Name}].");
      }
    }

    SecurityContext ??= SecurityContextProvider.DefaultProvider.CreateSecurityContext(this);

    using (SecurityContext.Impersonate(this))
    {
      // Must convert the FileAppender's filePath to an absolute path before we
      // call ExistingInit(). This will be done by the base.ActivateOptions() but
      // we need to duplicate that functionality here first.
      base.File = ConvertToFullPath(base.File!.Trim());

      // Store fully qualified base file name
      _baseFileName = base.File;
    }

    // initialize the mutex that is used to lock rolling
    _mutexForRolling = new Mutex(false, _baseFileName
      .Replace("\\", "_")
      .Replace(":", "_")
      .Replace("/", "_") + "_rolling"
    );

    if (_rollDate && File is not null && _scheduledFilename is null)
    {
      _scheduledFilename = CombinePath(File, _now.ToString(DatePattern, DateTimeFormatInfo.InvariantInfo));
    }

    ExistingInit();

    base.ActivateOptions();
  }