You can redirect stderr/stdout to a process substitution that adds the prefix of choice. For example, this script:
#! /bin/bash
exec > >(sed 's/^/foo: /')
exec 2> >(sed 's/^/foo: (stderr) /' >&2)
echo foo
echo bar >&2
date
Produces this output:
foo: foo
foo: (stderr) bar
foo: Fri Apr 27 20:04:34 IST 2018
The first two lines redirect stdout and stderr respectively to sed commands that add foo:  and foo: (stderr) to the input.
 
                