in src/log4net/Appender/RollingFileAppender.cs [1115:1176]
public override void ActivateOptions()
{
if (m_dateTime == null)
{
m_dateTime = new LocalDateTime();
}
if (m_rollDate && m_datePattern != null)
{
m_now = m_dateTime.Now;
m_rollPoint = ComputeCheckPeriod(m_datePattern);
if (m_rollPoint == RollPoint.InvalidRollPoint)
{
throw new ArgumentException("Invalid RollPoint, unable to parse ["+m_datePattern+"]");
}
// next line added as this removes the name check in rollOver
m_nextCheck = NextCheckDate(m_now, m_rollPoint);
}
else
{
if (m_rollDate)
{
ErrorHandler.Error("Either DatePattern or rollingStyle options are not set for ["+Name+"].");
}
}
if (SecurityContext == null)
{
SecurityContext = SecurityContextProvider.DefaultProvider.CreateSecurityContext(this);
}
using(SecurityContext.Impersonate(this))
{
// Must convert the FileAppender's m_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
m_baseFileName = base.File;
}
#if !NETCF
// initialize the mutex that is used to lock rolling
m_mutexForRolling = new Mutex(false, m_baseFileName
.Replace("\\", "_")
.Replace(":", "_")
.Replace("/", "_") + "_rolling"
);
#endif
if (m_rollDate && File != null && m_scheduledFilename == null)
{
m_scheduledFilename = CombinePath(File, m_now.ToString(m_datePattern, DateTimeFormatInfo.InvariantInfo));
}
ExistingInit();
base.ActivateOptions();
}