change this to

```js
function logToConsole() {
  method.apply(consoleObj, arguments);
}
logToConsole.displayName = 'console.' + name;
return logToConsole;
```