I have a function which returns a value and prints data to stdout and stderr. I cannot modify this function. I would now like to execute this function, capturing the data printed to stdout and stderr, storing it in two separate variables. If possible, I'd also like to store the function's return value in a third variable.
I've come accross (with-output-to-string (*standard-output*) ...)
but this won't let me capture both stdout and stderr. What options do I have?