Capturing console.log messages from pages


#1

When my page that is loaded into electron uses console.log, I would like to capture the message being sent so I can log it manually to a separate file. Is there a way to do this without modifying the page that is loaded?

I tried using console-message (from here) to no-avail. I imagine I should be able to do something like:

mainWindow = new BrowserWindow(browserProperties);
mainWindow.on('<SOMETHING>', function(msg) {
  ...
});

Thanks for the help!