You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2003/02/05 11:12:40 UTC
cvs commit: jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate RotateStrategyByDate.java RevolvingFileStrategy.java
mcconnell 2003/02/05 02:12:40
Modified: src/java/org/apache/log/output/io/rotate
RotateStrategyByDate.java
RevolvingFileStrategy.java
Log:
Checkstyle corrections and javadoc additions.
Revision Changes Path
1.7 +20 -1 jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategyByDate.java
Index: RotateStrategyByDate.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategyByDate.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- RotateStrategyByDate.java 4 Feb 2003 13:50:33 -0000 1.6
+++ RotateStrategyByDate.java 5 Feb 2003 10:12:40 -0000 1.7
@@ -61,6 +61,7 @@
/**
* Rotation stragety based on SimpleDateFormat.
*
+ * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon Development Team</a>
* @author <a href="mailto:colus@apache.org">Eung-ju Park</a>
* @version $Revision$ $Date$
*/
@@ -71,11 +72,19 @@
private Date m_date;
private String m_current;
+ /**
+ * Creation of a new rotation strategy based on a date policy.
+ */
public RotateStrategyByDate()
{
this( "yyyyMMdd" );
}
+ /**
+ * Creation of a new rotation strategy based on a date policy
+ * using a supplied pattern.
+ * @param pattern the message formatting pattern
+ */
public RotateStrategyByDate( final String pattern )
{
m_format = new SimpleDateFormat( pattern );
@@ -83,11 +92,21 @@
m_current = m_format.format( m_date );
}
+ /**
+ * Reset the strategy.
+ */
public void reset()
{
m_current = m_format.format( m_date );
}
+ /**
+ * Test is a rotation is required. Documentation pending ??
+ *
+ * @param data not used
+ * @param file not used
+ * @return TRUE if a rotation is required else FALSE
+ */
public boolean isRotationNeeded( final String data, final File file )
{
m_date.setTime( System.currentTimeMillis() );
1.13 +3 -2 jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/RevolvingFileStrategy.java
Index: RevolvingFileStrategy.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/RevolvingFileStrategy.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- RevolvingFileStrategy.java 5 Feb 2003 09:56:53 -0000 1.12
+++ RevolvingFileStrategy.java 5 Feb 2003 10:12:40 -0000 1.13
@@ -69,6 +69,7 @@
* are present then it will then set the initial rotation to the next rotation after
* the most recently created file.
*
+ * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon Development Team</a>
* @author <a href="mailto:bh22351@i-one.at">Bernhard Huber</a>
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
* @author <a href="mailto:david.gray@hic.gov.au">David Gray</a>
@@ -94,7 +95,7 @@
/**
* Creation of a new instane ofthe revolving file strategy.
* @param baseFile the base file
- * @param maxRotation the maximum number of rotations ??
+ * @param maxRotations the maximum number of rotations ??
*/
public RevolvingFileStrategy( final File baseFile, final int maxRotations )
{
@@ -105,7 +106,7 @@
* Creation of a new instane ofthe revolving file strategy.
* @param baseFile the base file
* @param initialRotation the number of initial rotations ??
- * @param maxRotation the maximum number of rotations??
+ * @param maxRotations the maximum number of rotations??
*/
public RevolvingFileStrategy( final File baseFile,
final int initialRotation,
---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-cvs-help@jakarta.apache.org
Re: cvs commit: jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate
RotateStrategyByDate.java RevolvingFileStrategy.java
Posted by Berin Loritsch <bl...@apache.org>.
Stephen McConnell wrote:
>
>
> Berin Loritsch wrote:
>
>> mcconnell@apache.org wrote:
>>
>>> --- RotateStrategyByDate.java 4 Feb 2003 13:50:33 -0000 1.6
>>> +++ RotateStrategyByDate.java 5 Feb 2003 10:12:40 -0000 1.7
>>> @@ -61,6 +61,7 @@
>>> /**
>>> * Rotation stragety based on SimpleDateFormat.
>>> *
>>> + * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon
>>> Development Team</a>
>>> * @author <a href="mailto:colus@apache.org">Eung-ju Park</a>
>>> * @version $Revision$ $Date$
>>> */
>>
>>
>>
>> You realize that when the Mailing lists are moved we will have to change
>> the link to dev@avalon.apache.org, right?
>
>
>
> Good point - what's the likely schedule for the switch?
I believe the request was put in. Apmail will notify us when the
change is complete.
---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate
RotateStrategyByDate.java RevolvingFileStrategy.java
Posted by Stephen McConnell <mc...@apache.org>.
Berin Loritsch wrote:
> mcconnell@apache.org wrote:
>
>> --- RotateStrategyByDate.java 4 Feb 2003 13:50:33 -0000 1.6
>> +++ RotateStrategyByDate.java 5 Feb 2003 10:12:40 -0000 1.7
>> @@ -61,6 +61,7 @@
>> /**
>> * Rotation stragety based on SimpleDateFormat.
>> *
>> + * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon
>> Development Team</a>
>> * @author <a href="mailto:colus@apache.org">Eung-ju Park</a>
>> * @version $Revision$ $Date$
>> */
>
>
> You realize that when the Mailing lists are moved we will have to change
> the link to dev@avalon.apache.org, right?
Good point - what's the likely schedule for the switch?
Steve.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
>
>
>
--
Stephen J. McConnell
mailto:mcconnell@apache.org
http://www.osm.net
---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org
Re: cvs commit: jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate
RotateStrategyByDate.java RevolvingFileStrategy.java
Posted by Berin Loritsch <bl...@apache.org>.
mcconnell@apache.org wrote:
> --- RotateStrategyByDate.java 4 Feb 2003 13:50:33 -0000 1.6
> +++ RotateStrategyByDate.java 5 Feb 2003 10:12:40 -0000 1.7
> @@ -61,6 +61,7 @@
> /**
> * Rotation stragety based on SimpleDateFormat.
> *
> + * @author <a href="mailto:avalon-dev@jakarta.apache.org">Avalon Development Team</a>
> * @author <a href="mailto:colus@apache.org">Eung-ju Park</a>
> * @version $Revision$ $Date$
> */
You realize that when the Mailing lists are moved we will have to change
the link to dev@avalon.apache.org, right?
---------------------------------------------------------------------
To unsubscribe, e-mail: avalon-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: avalon-dev-help@jakarta.apache.org