public final class Logging extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.slf4j.Logger |
getLogger(Class<?> clazz)
Get the logging facade for a specific class.
|
static Function<Object,String> |
getToStringConverter(Object context)
Gets the Object to String converter for a specific context,
or the
DefaultToStringConverter() if none was specified before. |
static Object |
LazyArg(Object argument)
Creates a lazy argument.
|
static Object |
LazyArg(Supplier<?> supplier)
Creates a lazy argument.
|
static Object |
LazyArgInContext(Object context,
Object argument)
Creates a new lazy argument for a specific context, whose Object to String converter will be used.
|
static Object |
LazyArgInContext(Object context,
Supplier<?> supplier)
Creates a new lazy argument for a specific context, whose Object to String converter will be used.
|
static Function<Object,String> |
LimitedElementsToStringConverter(int limit)
Creates a Object to String converter, which only includes a limited amount of elements
in the resulting String, if
Iterables or arrays are to be converted. |
static Function<Object,String> |
LimitedElementsToStringConverter(int limit,
Function<Object,String> toStringConverter)
Creates a Object to String converter, which only includes a limited amount of elements
in the resulting String, if
Iterables or arrays are to be converted. |
static Function<Object,String> |
LimitedElementsToStringConverter(ToIntFunction<Object> limitProvider,
Function<Object,String> toStringConverter)
Creates a Object to String converter, which only includes a limited amount of elements
in the resulting String, if
Iterables or arrays are to be converted. |
static Function<Object,String> |
setToStringConverter(Object context,
Function<Object,String> converter)
Registers an Object to String converter for a specific context.
|
public static org.slf4j.Logger getLogger(Class<?> clazz)
clazz - the requesting contextpublic static Function<Object,String> getToStringConverter(Object context)
DefaultToStringConverter() if none was specified before.context - the requesting contextpublic static Function<Object,String> setToStringConverter(Object context, Function<Object,String> converter)
context - the context to register the converter forconverter - the Object to String converterpublic static final Object LazyArgInContext(Object context, Object argument)
Object.toString() method is only called on demand.context - the context to register the lazy arg forargument - the argumentpublic static final Object LazyArgInContext(Object context, Supplier<?> supplier)
Object.toString() method is only called on demand.context - the context to register the lazy arg forsupplier - the argument supplierpublic static final Object LazyArg(Object argument)
Object.toString() method is only called on demand.argument - the argumentpublic static final Object LazyArg(Supplier<?> supplier)
Object.toString() method is only called on demand.supplier - the argument supplierpublic static Function<Object,String> LimitedElementsToStringConverter(int limit)
Iterables or arrays are to be converted.
For all other object's String.valueOf(Object) is used as converter.
For example, a List of Integers from 1 to 100, and a limit of 3,
will result in a String like this:
"[1, 2, 3, ...]"
limit - maximum amount of converted elements in Iterables and arrayspublic static Function<Object,String> LimitedElementsToStringConverter(int limit, Function<Object,String> toStringConverter)
Iterables or arrays are to be converted.
For all other object's the supplied toStringConverter will be used.
For example, a List of Integers from 1 to 100, and a limit of 3,
will result in a String like this:
"[1, 2, 3, ...]"
limit - maximum amount of converted elements in Iterables and arraystoStringConverter - the converter for all other objectspublic static Function<Object,String> LimitedElementsToStringConverter(ToIntFunction<Object> limitProvider, Function<Object,String> toStringConverter)
Iterables or arrays are to be converted.
For all other object's the supplied toStringConverter will be used.
For example, a List of Integers from 1 to 100, and a limit of 3,
will result in a String like this:
"[1, 2, 3, ...]"
limitProvider - provides maximum amount of converted elements in Iterables and arraystoStringConverter - the converter for all other objectsCopyright © 2022 MicroStream Software. All rights reserved.