public class ApexLogHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static int |
BARRIER_FOR_SIZE_IN_LOG
We want to see at least 2 digits: after printing 9999B, we print 10KB
|
static int |
TEN_F |
static int |
THOUSAND |
| Modifier | Constructor and Description |
|---|---|
protected |
ApexLogHelper() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
escapeNewLines(Object toString) |
static Object |
getFirstChars(Object toString,
int limitChars) |
static Object |
getNiceDouble(Double value) |
static Object |
getNiceMemory(long size) |
static Object |
getNicePercentage(long progress,
long max) |
static Object |
getNiceRate(long nbEntries,
long time,
TimeUnit timeUnit) |
static Object |
getNiceTime(long timeInMs) |
static Object |
getNiceTime(long time,
TimeUnit timeUnit) |
static Object |
getObjectAndClass(Object o) |
static Object |
getSingleRow(Object toString,
boolean removeEOL)
Deprecated.
Prefer .removeNewLines or .escapeNewLines
|
static Object |
getToStringWithLimit(Iterable<?> iterable,
int limitSize)
Deprecated.
prefer .getFirstChars
|
static Object |
lazyToString(Supplier<String> toStringMe)
This methods facilitates using logging framework at trace level, without using .isTraceEnabled, as the .toString
|
static Object |
removeNewLines(Object toString) |
protected static final int BARRIER_FOR_SIZE_IN_LOG
public static final int THOUSAND
public static final int TEN_F
public static Object lazyToString(Supplier<String> toStringMe)
toStringMe - the object from which a .toString should be computed lazilypublic static Object getNicePercentage(long progress, long max)
public static Object getNiceMemory(long size)
@Deprecated public static Object getToStringWithLimit(Iterable<?> iterable, int limitSize)
public static Object getNiceTime(long timeInMs)
@Deprecated public static Object getSingleRow(Object toString, boolean removeEOL)
toString - removeEOL - if true, we replace end-of-line characters by a space, else we escape themCopyright © 2014–2017 Pivotal Software, Inc.. All rights reserved.