as a safety, check for console existing first. in some cases, the console won't be available. preceed with:

console && console.log.apply(...