Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iojs/electron - Output all in console to file

I'm currently building an application in Electron which is at the moment using iojs 2.3.1, and what I'd like to do is output anything and everything that prints out in the dev tools console to file.

In the earlier versions of node this used to be available by piping from stdout/stderr, this is no longer possible and I can't for the life of me find a solution that works and doesn't involve changing large amounts of code.

Does anyone have a working solution for this? Thanks!

like image 215
Dustin Avatar asked Jul 13 '15 22:07

Dustin


1 Answers

End working result was using Winston with a quick change to make it work with Electron. https://github.com/dustinblackman/winston

EDIT:

As this answer is still being viewed, this solution is better. https://github.com/dustinblackman/winston-electron

like image 52
Dustin Avatar answered Sep 18 '22 22:09

Dustin