mcconnell    2003/02/05 01:56:53

  Modified:    src/java/org/apache/log/output/io/rotate
                        UniqueFileStrategy.java RotatingFileTarget.java
                        RotateStrategyByTime.java RotateStrategyBySize.java
                        RevolvingFileStrategy.java OrRotateStrategy.java
  Log:
  Checkstyle corrections and javadoc additions.
  
  Revision  Changes    Path
  1.6       +15 -0     
jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/UniqueFileStrategy.java
  
  Index: UniqueFileStrategy.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/UniqueFileStrategy.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- UniqueFileStrategy.java   3 Feb 2003 17:40:14 -0000       1.5
  +++ UniqueFileStrategy.java   5 Feb 2003 09:56:53 -0000       1.6
  @@ -82,17 +82,32 @@
   
       private String m_suffix;
   
  +   /**
  +    * Creation of a new Unique File Strategy ??
  +    * @param baseFile the base file 
  +    */
       public UniqueFileStrategy( final File baseFile )
       {
           m_baseFile = baseFile;
       }
   
  +   /**
  +    * Creation of a new Unique File Strategy ??
  +    * @param baseFile the base file 
  +    * @param pattern the format pattern 
  +    */
       public UniqueFileStrategy( final File baseFile, String pattern )
       {
           this( baseFile );
           m_formatter = new SimpleDateFormat( pattern );
       }
   
  +   /**
  +    * Creation of a new Unique File Strategy ??
  +    * @param baseFile the base file 
  +    * @param pattern the format pattern 
  +    * @param suffix the suffix ?? 
  +    */
       public UniqueFileStrategy( final File baseFile, String pattern, String suffix )
       {
           this( baseFile, pattern );
  
  
  
  1.13      +8 -0      
jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/RotatingFileTarget.java
  
  Index: RotatingFileTarget.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/RotatingFileTarget.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- RotatingFileTarget.java   3 Feb 2003 17:40:14 -0000       1.12
  +++ RotatingFileTarget.java   5 Feb 2003 09:56:53 -0000       1.13
  @@ -84,6 +84,7 @@
        * @param formatter Formatter to be used
        * @param rotateStrategy RotateStrategy to be used
        * @param fileStrategy FileStrategy to be used
  +     * @exception IOException if a file access or write related error occurs
        */
       public RotatingFileTarget( final Formatter formatter,
                                  final RotateStrategy rotateStrategy,
  @@ -100,6 +101,7 @@
        * @param formatter Formatter to be used
        * @param rotateStrategy RotateStrategy to be used
        * @param fileStrategy FileStrategy to be used
  +     * @exception IOException if a file access or write related error occurs
        */
       public RotatingFileTarget( final boolean append,
                                  final Formatter formatter,
  @@ -116,6 +118,11 @@
           rotate();
       }
   
  +   /**
  +    * Rote the file - ?? explination needed.
  +    * @exception IOException if a file related error occurs
  +    * @exception IOException if a file access or write related error occurs
  +    */
       protected synchronized void rotate()
           throws IOException
       {
  @@ -128,6 +135,7 @@
   
       /**
        * Output the log message, and check if rotation is needed.
  +     * @param data the date to write to the target
        */
       protected synchronized void write( final String data )
       {
  
  
  
  1.9       +1 -0      
jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategyByTime.java
  
  Index: RotateStrategyByTime.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategyByTime.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- RotateStrategyByTime.java 3 Feb 2003 17:40:14 -0000       1.8
  +++ RotateStrategyByTime.java 5 Feb 2003 09:56:53 -0000       1.9
  @@ -110,6 +110,7 @@
        * rotation is needed.
        *
        * @param data the last message written to the log system
  +     * @param file not used
        * @return boolean return true if log rotation is neccessary, else false
        */
       public boolean isRotationNeeded( final String data, final File file )
  
  
  
  1.10      +1 -0      
jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategyBySize.java
  
  Index: RotateStrategyBySize.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/RotateStrategyBySize.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- RotateStrategyBySize.java 3 Feb 2003 17:40:14 -0000       1.9
  +++ RotateStrategyBySize.java 5 Feb 2003 09:56:53 -0000       1.10
  @@ -100,6 +100,7 @@
        *
        *  @param data the last message written to the log system
        *  @return boolean return true if log rotation is neccessary, else false
  +     *  @param file not used
        */
       public boolean isRotationNeeded( final String data, final File file )
       {
  
  
  
  1.12      +12 -0     
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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- RevolvingFileStrategy.java        3 Feb 2003 17:40:14 -0000       1.11
  +++ RevolvingFileStrategy.java        5 Feb 2003 09:56:53 -0000       1.12
  @@ -91,11 +91,22 @@
       ///the base file name.
       private File m_baseFile;
   
  +   /**
  +    * Creation of a new instane ofthe revolving file strategy.
  +    * @param baseFile the base file
  +    * @param maxRotation the maximum number of rotations ??
  +    */
       public RevolvingFileStrategy( final File baseFile, final int maxRotations )
       {
           this( baseFile, -1, maxRotations );
       }
   
  +   /**
  +    * 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?? 
  +    */
       public RevolvingFileStrategy( final File baseFile,
                                     final int initialRotation,
                                     final int maxRotations )
  @@ -120,6 +131,7 @@
           {
               m_rotation = m_maxRotations;
           }
  +
           if( m_rotation < 0 )
           {
               m_rotation = 0;
  
  
  
  1.6       +2 -0      
jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/OrRotateStrategy.java
  
  Index: OrRotateStrategy.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-avalon-logkit/src/java/org/apache/log/output/io/rotate/OrRotateStrategy.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- OrRotateStrategy.java     3 Feb 2003 17:40:14 -0000       1.5
  +++ OrRotateStrategy.java     5 Feb 2003 09:56:53 -0000       1.6
  @@ -77,6 +77,7 @@
   
       /**
        * Constructor
  +     * @param strategies the set of rotation strategies 
        */
       public OrRotateStrategy( final RotateStrategy[] strategies )
       {
  @@ -102,6 +103,7 @@
        *  strategy object. If a rotation is needed, this result is returned.
        *  If not the next rotation strategy object is asked and so on.
        *  @param data the last message written to the log system
  +     *  @param file ???
        *  @return boolean return true if log rotation is neccessary, else false
        */
       public boolean isRotationNeeded( final String data, final File file )
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to