Package org.freedesktop.dbus.utils
Class LoggingHelper
java.lang.Object
org.freedesktop.dbus.utils.LoggingHelper
Helper for some logging stuff, e.g. avoid call
Arrays.deepToString(Object[]) if loglevel is not enabled.- Since:
- v3.2.4 - 2020-08-24
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringarraysVeryDeepString(Object[] _array) Creates a toString() result for an array.arraysVeryDeepStringRecursive(Object[] _array) Creates a toString() result for an array.static voidExecutes the runnable if the boolean is true.
-
Constructor Details
-
LoggingHelper
private LoggingHelper()
-
-
Method Details
-
arraysVeryDeepString
Creates a toString() result for an array. Will resolve nested arrays and collections.- Parameters:
_array- array to convert- Returns:
- String or null if input null
- Since:
- v4.2.2 - 2023-01-20
-
arraysVeryDeepStringRecursive
Creates a toString() result for an array. Will resolve nested arrays and collections.- Parameters:
_array- array to convert- Returns:
- List of String, null if input null
- Since:
- v4.2.2 - 2023-01-20
-
logIf
Executes the runnable if the boolean is true.- Parameters:
_enabled- boolean, if true runnable is executed_loggerCall- runnable containing logger call
-