Proxy the console.log() function using apply() in JavaScript