how to catch external output to logger