Permalink
Browse files

remove the dependency on JSONUtil

  • Loading branch information...
1 parent f8865f1 commit efb5738b85d6cf3acc8f046a5f8297ce58b69f32 @hbouvier committed Mar 5, 2012
Showing with 2 additions and 4 deletions.
  1. +0 −1 package.json
  2. +2 −3 watchdog.js
View
@@ -11,7 +11,6 @@
"url": "git@github.com:hbouvier/node-watchdog.git"
},
"dependencies": {
- "JSONUtil": "latest"
},
"devDependencies": {},
"optionalDependencies": {},
View
@@ -3,7 +3,6 @@ var util = require('util'),
fs = require('fs'),
http = require('http'),
url = require('url'),
- JSONUtil = require('JSONUtil').JSONUtil(),
spawn = require('child_process').spawn,
port = process.env.PORT || 8088,
version = '0.0.1',
@@ -197,13 +196,13 @@ function loadConfig(/*curr, prev*/) {
log('loading configuration file [' + configfile + ']');
fs.readFile(configfile, function (err, data) {
if (err) {
- log('ERROR reloading ' + configfile + ' >>>>> ' + JSONUtil.stringify(err) + ' <<<<< IGNORING UPDATE');
+ log('ERROR reloading ' + configfile + ' >>>>> ' + util.inspect(err, true, null) + ' <<<<< IGNORING UPDATE');
return;
}
try {
updateProcessesState(data);
} catch (exception) {
- log('ERROR parsing ' + configfile + ' >>>>> ' + JSONUtil.stringify(exception) + ' <<<<< IGNORING UPDATE');
+ log('ERROR parsing ' + configfile + ' >>>>> ' + util.inspect(exception, true,null) + ' <<<<< IGNORING UPDATE');
}
});
}

0 comments on commit efb5738

Please sign in to comment.