Interface FormattedLogger<T>

  • Type Parameters:
    T - The type of the Record instances managed by the Logger.
    All Superinterfaces:
    org.refcodes.mixin.ErrorPrintStreamAccessor, org.refcodes.mixin.ErrorPrintStreamAccessor.ErrorPrintStreamBuilder<FormattedLogger<T>>, org.refcodes.mixin.ErrorPrintStreamAccessor.ErrorPrintStreamMutator, org.refcodes.mixin.ErrorPrintStreamAccessor.ErrorPrintStreamProperty, org.refcodes.logger.Logger<T>, org.refcodes.mixin.RowWidthAccessor, org.refcodes.mixin.RowWidthAccessor.RowWidthBuilder<FormattedLogger<?>>, org.refcodes.mixin.RowWidthAccessor.RowWidthMutator, org.refcodes.mixin.RowWidthAccessor.RowWidthProperty, org.refcodes.mixin.StandardPrintStreamAccessor, org.refcodes.mixin.StandardPrintStreamAccessor.StandardPrintStreamBuilder<FormattedLogger<T>>, org.refcodes.mixin.StandardPrintStreamAccessor.StandardPrintStreamMutator, org.refcodes.mixin.StandardPrintStreamAccessor.StandardPrintStreamProperty, org.refcodes.textual.TableStyleAccessor, org.refcodes.textual.TableStyleAccessor.TableStyleBuilder<FormattedLogger<?>>, org.refcodes.textual.TableStyleAccessor.TableStyleMutator, org.refcodes.textual.TableStyleAccessor.TableStyleProperty
    All Known Subinterfaces:
    ConsoleLogger
    All Known Implementing Classes:
    ConsoleLoggerImpl, ConsoleLoggerSingleton, FormattedLoggerImpl

    public interface FormattedLogger<T>
    extends org.refcodes.logger.Logger<T>, org.refcodes.mixin.RowWidthAccessor.RowWidthProperty, org.refcodes.mixin.RowWidthAccessor.RowWidthBuilder<FormattedLogger<?>>, org.refcodes.textual.TableStyleAccessor.TableStyleProperty, org.refcodes.textual.TableStyleAccessor.TableStyleBuilder<FormattedLogger<?>>, org.refcodes.mixin.StandardPrintStreamAccessor.StandardPrintStreamProperty, org.refcodes.mixin.StandardPrintStreamAccessor.StandardPrintStreamBuilder<FormattedLogger<T>>, org.refcodes.mixin.ErrorPrintStreamAccessor.ErrorPrintStreamProperty, org.refcodes.mixin.ErrorPrintStreamAccessor.ErrorPrintStreamBuilder<FormattedLogger<T>>
    The FormattedLogger interface defines the methods to do pretty logging to the console's output- or error-streams.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.refcodes.mixin.ErrorPrintStreamAccessor

        org.refcodes.mixin.ErrorPrintStreamAccessor.ErrorPrintStreamBuilder<B extends org.refcodes.mixin.ErrorPrintStreamAccessor.ErrorPrintStreamBuilder<?>>, org.refcodes.mixin.ErrorPrintStreamAccessor.ErrorPrintStreamMutator, org.refcodes.mixin.ErrorPrintStreamAccessor.ErrorPrintStreamProperty
      • Nested classes/interfaces inherited from interface org.refcodes.mixin.RowWidthAccessor

        org.refcodes.mixin.RowWidthAccessor.RowWidthBuilder<B extends org.refcodes.mixin.RowWidthAccessor.RowWidthBuilder<?>>, org.refcodes.mixin.RowWidthAccessor.RowWidthMutator, org.refcodes.mixin.RowWidthAccessor.RowWidthProperty
      • Nested classes/interfaces inherited from interface org.refcodes.mixin.StandardPrintStreamAccessor

        org.refcodes.mixin.StandardPrintStreamAccessor.StandardPrintStreamBuilder<B extends org.refcodes.mixin.StandardPrintStreamAccessor.StandardPrintStreamBuilder<?>>, org.refcodes.mixin.StandardPrintStreamAccessor.StandardPrintStreamMutator, org.refcodes.mixin.StandardPrintStreamAccessor.StandardPrintStreamProperty
      • Nested classes/interfaces inherited from interface org.refcodes.textual.TableStyleAccessor

        org.refcodes.textual.TableStyleAccessor.TableStyleBuilder<B extends org.refcodes.textual.TableStyleAccessor.TableStyleBuilder<?>>, org.refcodes.textual.TableStyleAccessor.TableStyleMutator, org.refcodes.textual.TableStyleAccessor.TableStyleProperty
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      boolean hasEscapeCodes()
      Checks for escape codes.
      boolean hasLeftBorder()
      Checks for left border.
      boolean hasRightBorder()
      Checks for right border.
      void setEscapeCodes​(boolean isEscCodesEnabled)
      Sets the escape codes.
      void setLeftBorder​(boolean hasLeftBorder)
      Sets the left border.
      void setLoggerStyle​(java.lang.String aTableStyle)
      As the underlying configuration framework used by the RuntimeLoggerSingleton cannot convert a String to an enum, we got to provide such a method ourselves.
      void setRightBorder​(boolean hasRightBorder)
      Sets the right border.
      default FormattedLogger<T> withErrorPrintStream​(java.io.PrintStream aErrorPrintStream)
      default FormattedLogger<T> withEscapeCodes​(boolean isEscCodesEnabled)
      With escape codes.
      default FormattedLogger<T> withLeftBorder​(boolean hasLeftBorder)
      With left border.
      default FormattedLogger<T> withRightBorder​(boolean hasRightBorder)
      With right border.
      default FormattedLogger<?> withRowWidth​(int aRowWidth)
      default FormattedLogger<T> withStandardPrintStream​(java.io.PrintStream aStandardPrintStream)
      default FormattedLogger<?> withTableStyle​(org.refcodes.textual.TableStyle aTableStyle)
      • Methods inherited from interface org.refcodes.mixin.ErrorPrintStreamAccessor

        getErrorPrintStream
      • Methods inherited from interface org.refcodes.mixin.ErrorPrintStreamAccessor.ErrorPrintStreamMutator

        setErrorPrintStream
      • Methods inherited from interface org.refcodes.logger.Logger

        log, printSeparator
      • Methods inherited from interface org.refcodes.mixin.RowWidthAccessor

        getRowWidth
      • Methods inherited from interface org.refcodes.mixin.RowWidthAccessor.RowWidthMutator

        setRowWidth
      • Methods inherited from interface org.refcodes.mixin.StandardPrintStreamAccessor

        getStandardPrintStream
      • Methods inherited from interface org.refcodes.mixin.StandardPrintStreamAccessor.StandardPrintStreamMutator

        setStandardPrintStream
      • Methods inherited from interface org.refcodes.textual.TableStyleAccessor

        getTableStyle
      • Methods inherited from interface org.refcodes.textual.TableStyleAccessor.TableStyleMutator

        setTableStyle
    • Method Detail

      • setLoggerStyle

        void setLoggerStyle​(java.lang.String aTableStyle)
        As the underlying configuration framework used by the RuntimeLoggerSingleton cannot convert a String to an enum, we got to provide such a method ourselves. When configuring programmatically use TableStyleAccessor.TableStyleMutator.setTableStyle(TableStyle), when using the "runtimelogger-config.xml" use the property "loggerStyle" for this method to be invoked. Valid arguments are as of the TableStyle enumeration:
        • SINGLE
        • DOUBLE
        • DOUBLE_SINGLE
        • SINGLE_DOUBLE
        • SINGLE_DASHED
        • ASCII
        • BLANK
        • SINGLE_BLANK
        • ASCII_BLANK
        Parameters:
        aTableStyle - The style to use for the logger.
      • setEscapeCodes

        void setEscapeCodes​(boolean isEscCodesEnabled)
        Sets the escape codes.
        Parameters:
        isEscCodesEnabled - the new escape codes
      • withEscapeCodes

        default FormattedLogger<T> withEscapeCodes​(boolean isEscCodesEnabled)
        With escape codes.
        Parameters:
        isEscCodesEnabled - the is esc codes enabled
        Returns:
        the formatted logger
      • hasEscapeCodes

        boolean hasEscapeCodes()
        Checks for escape codes.
        Returns:
        true, if successful
      • hasLeftBorder

        boolean hasLeftBorder()
        Checks for left border.
        Returns:
        true, if successful
      • setLeftBorder

        void setLeftBorder​(boolean hasLeftBorder)
        Sets the left border.
        Parameters:
        hasLeftBorder - the new left border
      • withLeftBorder

        default FormattedLogger<T> withLeftBorder​(boolean hasLeftBorder)
        With left border.
        Parameters:
        hasLeftBorder - the has left border
        Returns:
        the formatted logger
      • hasRightBorder

        boolean hasRightBorder()
        Checks for right border.
        Returns:
        true, if successful
      • setRightBorder

        void setRightBorder​(boolean hasRightBorder)
        Sets the right border.
        Parameters:
        hasRightBorder - the new right border
      • withRightBorder

        default FormattedLogger<T> withRightBorder​(boolean hasRightBorder)
        With right border.
        Parameters:
        hasRightBorder - the has right border
        Returns:
        the formatted logger
      • withErrorPrintStream

        default FormattedLogger<T> withErrorPrintStream​(java.io.PrintStream aErrorPrintStream)
        Specified by:
        withErrorPrintStream in interface org.refcodes.mixin.ErrorPrintStreamAccessor.ErrorPrintStreamBuilder<T>
      • withStandardPrintStream

        default FormattedLogger<T> withStandardPrintStream​(java.io.PrintStream aStandardPrintStream)
        Specified by:
        withStandardPrintStream in interface org.refcodes.mixin.StandardPrintStreamAccessor.StandardPrintStreamBuilder<T>
      • withTableStyle

        default FormattedLogger<?> withTableStyle​(org.refcodes.textual.TableStyle aTableStyle)
        Specified by:
        withTableStyle in interface org.refcodes.textual.TableStyleAccessor.TableStyleBuilder<T>
      • withRowWidth

        default FormattedLogger<?> withRowWidth​(int aRowWidth)
        Specified by:
        withRowWidth in interface org.refcodes.mixin.RowWidthAccessor.RowWidthBuilder<T>