electron / electron

:electron: Build cross-platform desktop apps with JavaScript, HTML, and CSS
https://electronjs.org
MIT License
113.65k stars 15.29k forks source link

Override Electron Logging #3074

Closed kurisubrooks closed 8 years ago

kurisubrooks commented 8 years ago

Is there any way to override Electron's logging system? I've got a module that logs console output to a file, but it must be called with a function. How could I apply this to Electron, to get it to use this module?

Example of Electron Console output (as called from web renderer):

[4448:1013/172627:INFO:CONSOLE(38)] "[%] [13/10/2015 5:26:26pm] Program Started", source: /Users/Kurisu/Dropbox/Code/GitHub/eew/client/node_modules/lumios-toolkit/src/index.js (38)

Example of standard console output:

[%] [13/10/2015 5:26:26pm] Program Started

Example of logging function:

logger.debug('Program Started');
kurisubrooks commented 8 years ago

I've just updated to v0.33.7, but now I don't get any logs at all. The code i've been testing against can be found here: https://github.com/lumios/eew/blob/master/src/settings.html

zcbenz commented 8 years ago

This has been solved on master branch, and the fix will be included in next release.