Sip debug to log file

Anyone have any ideas how one can get the output from >> “sip set debug peer XXX” to a log file?

logger.conf seems to only care about the regular asterisk debug messages. I tried to write a cron script to connect to a console and pipe it to a log file, but i can’t run a command after the asterisk -rvvvv cmd. There’s supposed to be a -x option but that doesn’t seem to stay connected to the console.