A configurable window.log() function