public static String truncate(final String str, final int maxLength) {
        if (str == null || str.length() < maxLength) {
            return str;
        } else {
            return str.substring(0, maxLength) + "...";
        }
    }
@return The simple class name followed by value.toString().
If value is null, returns null.
stroom-util/src/main/java/stroom/util/logging/LogUtil.java