Extra config checks on config.log overloading
authorDarren <darren@Darrens-MacBook-Pro.local>
Tue, 26 Mar 2013 12:09:26 +0000 (12:09 +0000)
committerDarren <darren@Darrens-MacBook-Pro.local>
Tue, 26 Mar 2013 12:09:26 +0000 (12:09 +0000)
server/kiwi.js

index a464a3544a1122a2248df95d5a1d530cd3875162..014cac09a19ff74f40424b5f530d6da97614fb17 100755 (executable)
@@ -14,7 +14,7 @@ config.loadConfig();
 
 // If we're not running in the forground and we have a log file.. switch
 // console.log to output to a file
-if (process.argv.indexOf('-f') === -1 && global.config.log) {
+if (process.argv.indexOf('-f') === -1 && global.config && global.config.log) {
     (function () {
         var log_file_name = global.config.log;