Package org.ojalgo.netio
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
andERROR
to something suitable.invalid reference
BasicLogger.Printer
- 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
andERROR
to null.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
static interface
Temporarily store data/text.static class
static interface
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BasicLogger
static final BasicLogger
static final BasicLogger
-
Method Summary
Modifier and TypeMethodDescriptionasWriter()
default void
Will print 1 line/row with the objects in fixed width columnsstatic void
debug()
static void
static void
static void
static void
static void
debugColumns
(int width, Object... columns) static void
debugFormatted
(String format, Object... args) static void
debugMatrix
(String message, Access2D<?> matrix) static void
debugMatrix
(String message, Access2D<?> matrix, NumberContext context) static void
error()
static void
static void
static void
static void
static void
errorColumns
(int width, Object... columns) static void
errorFormatted
(String format, Object... args) static void
errorMatrix
(String message, Access2D<?> matrix) static void
errorMatrix
(String message, Access2D<?> matrix, NumberContext context) void
print
(boolean value) void
print
(byte value) void
print
(char value) void
print
(double value) void
print
(float value) void
print
(int value) void
print
(long value) void
print
(short value) void
void
void
void
println()
default void
default void
default void
default void
default void
default void
printmtrx
(String message, Access2D<?> matrix, NumberContext context)
-
Field Details
-
DEBUG
-
ERROR
-
NULL
-
-
Method Details
-
debug
static void debug() -
debug
-
debug
-
debug
-
debug
-
debugColumns
-
debugFormatted
-
debugMatrix
-
debugMatrix
-
error
static void error() -
error
-
error
-
error
-
error
-
errorColumns
-
errorFormatted
-
errorMatrix
-
errorMatrix
-
asWriter
-
columns
Will print 1 line/row with the objects in fixed width columns- Parameters:
width
- The exact witdth of each columncolumns
- The column objects,invalid reference
#toString()
-
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
-
print
void print(short value) -
print
-
printf
-
println
void println() -
println
-
println
-
println
-
println
-
printmtrx
-
printmtrx
-