User: starksm 
  Date: 01/11/20 01:42:54

  Modified:    src/main/org/jboss/logging/log4j Tag: Branch_2_4
                        CategoryWriter.java TracePriority.java
  Removed:     src/main/org/jboss/logging/log4j Tag: Branch_2_4
                        JBossCategory.java
  Log:
  Change to the unified log4j based org.jboss.logging.Logger class.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.4.2   +32 -20    jboss/src/main/org/jboss/logging/log4j/CategoryWriter.java
  
  Index: CategoryWriter.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/logging/log4j/CategoryWriter.java,v
  retrieving revision 1.1.4.1
  retrieving revision 1.1.4.2
  diff -u -r1.1.4.1 -r1.1.4.2
  --- CategoryWriter.java       2001/09/30 23:12:21     1.1.4.1
  +++ CategoryWriter.java       2001/11/20 09:42:54     1.1.4.2
  @@ -26,18 +26,20 @@
    * @version    $$
    */
   public class CategoryWriter
  -       extends PrintWriter {
  +   extends PrintWriter
  +{
      private Category category;
      private Priority priority;
      private boolean  inWrite;
      private boolean  issuedWarning;
  -
  +   
      /**
       *  Redirect logging to the indicated category using Priority.INFO
       *
       * @param  category  Description of Parameter
       */
  -   public CategoryWriter( final Category category ) {
  +   public CategoryWriter( final Category category )
  +   {
         this( category, Priority.INFO );
      }
   
  @@ -49,51 +51,61 @@
       * @param  priority  Description of Parameter
       */
      public CategoryWriter( final Category category,
  -         final Priority priority ) {
  +      final Priority priority )
  +   {
         super( new InternalCategoryWriter( category, priority ), true );
      }
  -
  +   
      /**
       * @created    August 19, 2001
       */
  -   static class InternalCategoryWriter extends Writer {
  +   static class InternalCategoryWriter extends Writer
  +   {
         private Category category;
         private Priority priority;
         private boolean closed;
  -
  -      public InternalCategoryWriter( final Category category, final Priority 
priority ) {
  +      
  +      public InternalCategoryWriter( final Category category, final Priority 
priority )
  +      {
            lock = category;
            //synchronize on this category
            this.category = category;
            this.priority = priority;
         }
  -
  +      
         public void write( char[] cbuf, int off, int len )
  -         throws IOException {
  -         if ( closed ) {
  +         throws IOException
  +      {
  +         if ( closed )
  +         {
               throw new IOException( "Called write on closed Writer" );
            }
            // Remove the end of line chars
  -         while ( len > 0 && ( cbuf[len - 1] == '\n' || cbuf[len - 1] == '\r' ) ) {
  +         while ( len > 0 && ( cbuf[len - 1] == '\n' || cbuf[len - 1] == '\r' ) )
  +         {
               len--;
            }
  -         if ( len > 0 ) {
  +         if ( len > 0 )
  +         {
               category.log( priority, String.copyValueOf( cbuf, off, len ) );
            }
         }
  -
  -
  +      
  +      
         public void flush()
  -         throws IOException {
  -         if ( closed ) {
  +         throws IOException
  +      {
  +         if ( closed )
  +         {
               throw new IOException( "Called flush on closed Writer" );
            }
         }
  -
  -      public void close() {
  +      
  +      public void close()
  +      {
            closed = true;
         }
      }
  -
  +   
   }
   
  
  
  
  1.2.2.2   +2 -1      jboss/src/main/org/jboss/logging/log4j/Attic/TracePriority.java
  
  Index: TracePriority.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/logging/log4j/Attic/TracePriority.java,v
  retrieving revision 1.2.2.1
  retrieving revision 1.2.2.2
  diff -u -r1.2.2.1 -r1.2.2.2
  --- TracePriority.java        2001/08/20 22:14:16     1.2.2.1
  +++ TracePriority.java        2001/11/20 09:42:54     1.2.2.2
  @@ -17,7 +17,8 @@
    @see org.apache.log4j.Priority
    
    @author [EMAIL PROTECTED]
  - @version $Revision: 1.2.2.1 $
  + @version $Revision: 1.2.2.2 $
  + @deprecated, use the org.jboss.logging.TracePriority class.
    */
   public class TracePriority extends Priority
   {
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to