org.springframework.util

Class CommonsLogWriter

  • java.lang.Object
    • java.io.Writer
      • org.springframework.util.CommonsLogWriter
  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable


    public class CommonsLogWriter
    extends java.io.Writer
    java.io.Writer adapter for a Commons Logging Log.
    Since:
    2.5.1
    Author:
    Juergen Hoeller
    • Field Summary

      • Fields inherited from class java.io.Writer

        lock
    • Constructor Summary

      Constructors 
      Constructor and Description
      CommonsLogWriter(Log logger)
      Create a new CommonsLogWriter for the given Commons Logging logger.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void close() 
      void flush() 
      void write(char ch) 
      void write(char[] buffer, int offset, int length) 
      • Methods inherited from class java.io.Writer

        append, append, append, write, write, write, write
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommonsLogWriter

        public CommonsLogWriter(Log logger)
        Create a new CommonsLogWriter for the given Commons Logging logger.
        Parameters:
        logger - the Commons Logging logger to write to
    • Method Detail

      • write

        public void write(char ch)
      • write

        public void write(char[] buffer,
                          int offset,
                          int length)
        Specified by:
        write in class java.io.Writer
      • flush

        public void flush()
        Specified by:
        flush in interface java.io.Flushable
        Specified by:
        flush in class java.io.Writer
      • close

        public void close()
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in class java.io.Writer