I don’t believe I’ve ever been able to get an infomessage.publish back from a function. I could be mistaken.
How to write to task log from scheduled Functions
BPM Logging Snippet
How to write your own trace logs