Interface BasicLogger

All Known Implementing Classes:
BasicLogger.BasicWriter, CharacterRing.RingLogger

public interface BasicLogger
BasicLogger is not meant to replace any other logging library. It is primarily used for debugging during development. ojAlgo has zero dependencies, and does not force any specific logging framework on you. But, that meant we had to create something a little better than plain System.out for internal use.
  • If you want to redirect whatever ojAlgo outputs then set DEBUG and ERROR to something suitable.
    invalid reference
    BasicLogger.Printer
    is an interface so it should be possible to create some implementation that wraps your logging system. ojAlgo supplies 3 implementations of that interface.
  • ojAlgo typically doesn't do much logging. There's really not much to redirect. The main/only area where BasicLogger is used is for debugging the various optimisation solvers. This is not intended to be "on" in production.
  • The logging you need, you do in your code. ojAlgo's main contribution here is to have useful toString() methods.
  • If you want to stop any/all possible output from ojAlgo then set DEBUG and ERROR to null.
  • Field Details

  • Method Details

    • debug

      static void debug()
    • debug

      static void debug(int tabs, String message, Object... arguments)
    • debug

      static void debug(Object message)
    • debug

      static void debug(String message, Object... arguments)
    • debug

      static void debug(Throwable throwable, String message, Object... arguments)
    • debugColumns

      static void debugColumns(int width, Object... columns)
    • debugFormatted

      static void debugFormatted(String format, Object... args)
    • debugMatrix

      static void debugMatrix(String message, Access2D<?> matrix)
    • debugMatrix

      static void debugMatrix(String message, Access2D<?> matrix, NumberContext context)
    • error

      static void error()
    • error

      static void error(int tabs, String message, Object... arguments)
    • error

      static void error(Object message)
    • error

      static void error(String message, Object... arguments)
    • error

      static void error(Throwable throwable, String message, Object... arguments)
    • errorColumns

      static void errorColumns(int width, Object... columns)
    • errorFormatted

      static void errorFormatted(String format, Object... args)
    • errorMatrix

      static void errorMatrix(String message, Access2D<?> matrix)
    • errorMatrix

      static void errorMatrix(String message, Access2D<?> matrix, NumberContext context)
    • asWriter

      Optional<Writer> asWriter()
    • columns

      default void columns(int width, Object... columns)
      Will print 1 line/row with the objects in fixed width columns
      Parameters:
      width - The exact witdth of each column
      columns - The column objects,
      invalid reference
      #toString()
      and then fix the length/width
    • print

      void print(boolean value)
    • print

      void print(byte value)
    • print

      void print(char value)
    • print

      void print(double value)
    • print

      void print(float value)
    • print

      void print(int value)
    • print

      void print(long value)
    • print

      void print(Object object)
    • print

      void print(short value)
    • print

      void print(Throwable throwable)
    • printf

      void printf(String format, Object... args)
    • println

      void println()
    • println

      default void println(int tabs, String message, Object... args)
    • println

      default void println(Object object)
    • println

      default void println(String message, Object... args)
    • println

      default void println(Throwable throwable, String message, Object... args)
    • printmtrx

      default void printmtrx(String message, Access2D<?> matrix)
    • printmtrx

      default void printmtrx(String message, Access2D<?> matrix, NumberContext context)