How can I archive (as a file) the console output of a jenkins pipeline step such as `docker.build(someTag)`?

Background:

I use jenkins pipelines to build a whole bunch of microservices.

I want to extract all the relevant information from the jenkins console into archived files, so that devs don't have to look at the console which confuses them. This works fine for `sh` steps were I can redirect stdout and stderr but how can I do something similar for a jenkins pipeline step?