Package jetbrains.buildServer.log
Class LogUtil
- java.lang.Object
-
- jetbrains.buildServer.log.LogUtil
-
-
Constructor Summary
Constructors Constructor Description LogUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
describe(Object o)
static <T> String
describe(Collection<T> collection, String separator, String prefix, String suffix, int limitItems)
Returns a string representation of a collection of Loggable items, with given limit.static String
describe(Date date)
static String
quote(String text)
Quote the text (such as id) for logging or presentation to the user in messages.
-
-
-
Method Detail
-
quote
@NotNull public static String quote(@Nullable String text)
Quote the text (such as id) for logging or presentation to the user in messages.- Parameters:
text
- text to quote- Returns:
- quoted text
-
describe
@NotNull public static <T> String describe(@Nullable Collection<T> collection, @NotNull String separator, @NotNull String prefix, @NotNull String suffix, int limitItems)
Returns a string representation of a collection of Loggable items, with given limit. May be used in logs when a collection with potentially large number of items should be logged.- Parameters:
limitItems
- up to this number of items will be logged, if there are more, count of items in collection will be appended- Since:
- 2020.1
-
-