Class LogAppendable

  • All Implemented Interfaces:
    java.lang.Appendable

    final class LogAppendable
    extends java.lang.Object
    implements java.lang.Appendable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.StringBuilder buffer  
      private org.slf4j.Logger log  
      private java.lang.String prefix  
    • Constructor Summary

      Constructors 
      Constructor Description
      LogAppendable​(org.slf4j.Logger log, java.lang.String prefix)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Appendable append​(char ch)  
      java.lang.Appendable append​(java.lang.CharSequence text)  
      java.lang.Appendable append​(java.lang.CharSequence text, int start, int end)  
      void flush()  
      • Methods inherited from class java.lang.Object

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

      • log

        private final org.slf4j.Logger log
      • prefix

        private final java.lang.String prefix
      • buffer

        private final java.lang.StringBuilder buffer
    • Constructor Detail

      • LogAppendable

        public LogAppendable​(org.slf4j.Logger log,
                             java.lang.String prefix)
    • Method Detail

      • append

        public java.lang.Appendable append​(java.lang.CharSequence text)
                                    throws java.io.IOException
        Specified by:
        append in interface java.lang.Appendable
        Throws:
        java.io.IOException
      • append

        public java.lang.Appendable append​(java.lang.CharSequence text,
                                           int start,
                                           int end)
                                    throws java.io.IOException
        Specified by:
        append in interface java.lang.Appendable
        Throws:
        java.io.IOException
      • append

        public java.lang.Appendable append​(char ch)
                                    throws java.io.IOException
        Specified by:
        append in interface java.lang.Appendable
        Throws:
        java.io.IOException
      • flush

        public void flush()