You can access the parent window's console from within an iframe using the window.parent property.
// from within the iframe:
parent.console.log('Hello World');
This will output in the parent window's console.
You can read more here: https://developer.mozilla.org/en-US/docs/Web/API/Window/parent