Niveau de log à 'debug' si NODE_ENV == devlopment

This commit is contained in:
wpetit 2016-03-03 10:32:14 +01:00
parent 5655d4d126
commit 8f93f9f453

View File

@ -6,6 +6,9 @@ var Util = require('./'+(isDev ? 'src': 'dist')+'/util');
var mainWindow = null;
// Set log level to "debug" if NODE_ENV==devlopment
if(isDev) Util.Logger.level = 'debug';
// Quit when all windows are closed.
app.on('window-all-closed', function() {
app.quit();
@ -41,11 +44,11 @@ app.on('ready', function() {
});
mainWindow.on('blur', function() {
Util.Logger.info('Focus loosed.');
Util.Logger.debug('Focus loosed.');
});
mainWindow.on('focus', function() {
Util.Logger.info('Focus gained.');
Util.Logger.debug('Focus gained.');
mainWindow.show();
});