Logging using function as decorator in Guava
The concept seems fine to me. The problem is that you will still need to decide whether to decorate, or not decorate the function, and that is done outside the function. That makes it a once-per-create decision, which is OK, but you may still end up with a lot of conditions in your code:

Function f = logFunction() ? new DecoratorLoggerInfoFunc(f) : f;


The actual apply method is not very robust though. I would include logging of any potential exceptions that are not declared to be thrown on the function itself...:

public O apply(I input) {
    try {
        O output = function.apply(input);
        logger.info("Input is {} Output is {}", input, output);
        return output;
    } catch (RuntimeException e) {
        logger.warn("Exception running with input {}", input, e);
        throw e;
    }
}