Commits

Dominik P committed 6f36a5b

Added a default constructor that enables us to test this scenario

  • Participants
  • Parent commits b84e022

Comments (0)

Files changed (1)

 
 diff -r 5a5078efc63a src/Appender/RollingFileAppenderNG.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/RollingFileAppenderNG.cs	Wed Sep 21 22:12:17 2011 +0200
-@@ -0,0 +1,140 @@
++++ b/src/Appender/RollingFileAppenderNG.cs	Wed Sep 21 22:21:34 2011 +0200
+@@ -0,0 +1,143 @@
 +#region Apache License
 +//
 +// Licensed to the Apache Software Foundation (ASF) under one or more 
 +		/// </remarks>
 +		public RollingFileAppenderNG() 
 +		{
++            // for now set up the cron rolling condition and the index rolling strategy by default
++            RollingCondition = new CronRollingCondition("*", "*", "*", "*", "*");
++            RollingStrategy = new IndexRollingStrategy();
 +		}
 +
 +		#endregion Public Instance Constructors
 +}
 diff -r 5a5078efc63a src/Appender/RollingFileAppenderNGAPI/CronRollingCondition.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/RollingFileAppenderNGAPI/CronRollingCondition.cs	Wed Sep 21 22:12:17 2011 +0200
-@@ -0,0 +1,139 @@
++++ b/src/Appender/RollingFileAppenderNGAPI/CronRollingCondition.cs	Wed Sep 21 22:21:34 2011 +0200
+@@ -0,0 +1,153 @@
 +#region Apache License
 +//
 +// Licensed to the Apache Software Foundation (ASF) under one or more 
 +		protected Tuple<int?, MatchType> Hour { get; private set; }
 +		protected Tuple<int?, MatchType> Minute { get; private set; }
 +
++        public CronRollingCondition()
++            : this("*", "*", "*", "*", "*")
++        {
++        }
++
++        public CronRollingCondition(string dow, string month, string day, string hour, string minute)
++        {
++            Dow = TryParse(dow);
++            Month = TryParse(month);
++            Day = TryParse(day);
++            Hour = TryParse(hour);
++            Minute = TryParse(minute);
++        }
++
 +		public bool IsMet(string file)
 +		{
 +			DateTime now = DateTime.Now;
 +}
 diff -r 5a5078efc63a src/Appender/RollingFileAppenderNGAPI/IRollingCondition.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/RollingFileAppenderNGAPI/IRollingCondition.cs	Wed Sep 21 22:12:17 2011 +0200
++++ b/src/Appender/RollingFileAppenderNGAPI/IRollingCondition.cs	Wed Sep 21 22:21:34 2011 +0200
 @@ -0,0 +1,38 @@
 +#region Apache License
 +//
 +}
 diff -r 5a5078efc63a src/Appender/RollingFileAppenderNGAPI/IRollingStrategy.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/RollingFileAppenderNGAPI/IRollingStrategy.cs	Wed Sep 21 22:12:17 2011 +0200
++++ b/src/Appender/RollingFileAppenderNGAPI/IRollingStrategy.cs	Wed Sep 21 22:21:34 2011 +0200
 @@ -0,0 +1,32 @@
 +#region Apache License
 +//
 +}
 diff -r 5a5078efc63a src/Appender/RollingFileAppenderNGAPI/IndexRollingStrategy.cs
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/src/Appender/RollingFileAppenderNGAPI/IndexRollingStrategy.cs	Wed Sep 21 22:12:17 2011 +0200
++++ b/src/Appender/RollingFileAppenderNGAPI/IndexRollingStrategy.cs	Wed Sep 21 22:21:34 2011 +0200
 @@ -0,0 +1,60 @@
 +#region Apache License
 +//
 +}
 diff -r 5a5078efc63a src/log4net.vs2010.csproj
 --- a/src/log4net.vs2010.csproj	Tue Sep 20 17:52:26 2011 +0000
-+++ b/src/log4net.vs2010.csproj	Wed Sep 21 22:12:17 2011 +0200
++++ b/src/log4net.vs2010.csproj	Wed Sep 21 22:21:34 2011 +0200
 @@ -187,6 +187,13 @@
      <Compile Include="Appender\RollingFileAppender.cs">
        <SubType>Code</SubType>