adding a debug library
[nodejs-repoproxy.git] / lib / debug.js
1 var log = require("./log.js");
2
3 function startDebugTimer() {
4         if(typeof global.repoproxy != "undefined") {
5                 if(global.repoproxy.loglevel >= 5) {
6                         log.debug("starting debug timer on loglevel");
7                         setInterval(debugTimer, 1500);
8                 }
9         }
10 }
11
12 function debugTimer() {
13         log.debug("globals: ", global.repoproxy);
14         log.debug("*****TICK******");
15 }
16
17 exports.startDebugTimer = startDebugTimer;