replate console logger with custom a function