create logging wrapper to postMessage logs to console