public static String truncateUnless(final String str,
                                        final int maxLength,
                                        final boolean isTruncationSkipped) {
        if (str == null || str.length() < maxLength || isTruncationSkipped) {
            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