X-Git-Url: http://git.pjr.cc/?p=nodejs-repoproxy.git;a=blobdiff_plain;f=lib%2Fdebug.js;fp=lib%2Fdebug.js;h=5a6cc8a2675900db12cd08177b60237b641454eb;hp=0000000000000000000000000000000000000000;hb=e03ba0bc17312d19afba035295d9b10049b10cb7;hpb=9ce3e2a4e56f91fdc7d6295d3d064f2739955404 diff --git a/lib/debug.js b/lib/debug.js new file mode 100644 index 0000000..5a6cc8a --- /dev/null +++ b/lib/debug.js @@ -0,0 +1,17 @@ +var log = require("./log.js"); + +function startDebugTimer() { + if(typeof global.repoproxy != "undefined") { + if(global.repoproxy.loglevel >= 5) { + log.debug("starting debug timer on loglevel"); + setInterval(debugTimer, 1500); + } + } +} + +function debugTimer() { + log.debug("globals: ", global.repoproxy); + log.debug("*****TICK******"); +} + +exports.startDebugTimer = startDebugTimer; \ No newline at end of file