Browse Source

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

William Petit 3 years ago
parent
commit
8f93f9f453
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      main.js

+ 5
- 2
main.js View File

@@ -6,6 +6,9 @@ var Util = require('./'+(isDev ? 'src': 'dist')+'/util');
6 6
 
7 7
 var mainWindow = null;
8 8
 
9
+// Set log level to "debug" if NODE_ENV==devlopment
10
+if(isDev) Util.Logger.level = 'debug';
11
+
9 12
 // Quit when all windows are closed.
10 13
 app.on('window-all-closed', function() {
11 14
   app.quit();
@@ -41,11 +44,11 @@ app.on('ready', function() {
41 44
   });
42 45
 
43 46
   mainWindow.on('blur', function() {
44
-    Util.Logger.info('Focus loosed.');
47
+    Util.Logger.debug('Focus loosed.');
45 48
   });
46 49
 
47 50
   mainWindow.on('focus', function() {
48
-    Util.Logger.info('Focus gained.');
51
+    Util.Logger.debug('Focus gained.');
49 52
     mainWindow.show();
50 53
   });
51 54