public <T> String toStringLimited(final Collection<T> collection, final int limit, final Func1<T, String> mapper) {
        if (collection == null || !isActive()) {
            return "#-[]";
        }
        return "#" + collection.size() + "[" + CollectionStream.of(collection).limit(limit).map(mapper).toJoinedString(",") + "]";
    }
Helper class to construct log messages. Optimized to log what is happening in a method,
but can be used in other situations as well.
<br>
All logging is done on level given in constructor, default is VERBOSE level.
main/src/main/java/cgeo/geocaching/utils/ContextLogger.java