Skip to content

Commit

Permalink
Merge pull request statsd#233 from keen99/p/debugupdates
Browse files Browse the repository at this point in the history
add a bit more debug output - sets, numStats
  • Loading branch information
mrtazz committed Feb 19, 2013
2 parents ac2a390 + 82bf445 commit b4f4d4e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion backends/graphite.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,10 @@ var flush_stats = function graphite_flush(ts, metrics) {
statString += the_key.join(".") + ' ' + statsd_metrics[key] + ts_suffix;
}
}

post_stats(statString);
if (debug) {
l.log("numStats: " + numStats);
}
};

var backend_status = function graphite_status(writeCb) {
Expand Down
7 changes: 4 additions & 3 deletions stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function loadBackend(config, name) {
var backendmod = require(name);

if (config.debug) {
l.log("Loading backend: " + name, 'debug');
l.log("Loading backend: " + name, 'DEBUG');
}

var ret = backendmod.init(startup_time, config, backendEvents);
Expand Down Expand Up @@ -110,9 +110,10 @@ config.configFile(process.argv[2], function (config, oldConfig) {
clearInterval(debugInt);
}
debugInt = setInterval(function () {
l.log("Counters:\n" + util.inspect(counters) +
l.log("\nCounters:\n" + util.inspect(counters) +
"\nTimers:\n" + util.inspect(timers) +
"\nGauges:\n" + util.inspect(gauges), 'debug');
"\nSets:\n" + util.inspect(sets) +
"\nGauges:\n" + util.inspect(gauges), 'DEBUG');
}, config.debugInterval || 10000);
}

Expand Down

0 comments on commit b4f4d4e

Please sign in to comment.