From 33e1a96da59953acec368ed4bc4e8011f6d34f0b Mon Sep 17 00:00:00 2001 From: onefang Date: Sat, 24 Jul 2021 00:53:32 +1000 Subject: Don't actually print debug stuff if debug is turned off. Also default to debug off. --- src/sledjchisl/sledjchisl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/sledjchisl/sledjchisl.c') diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 9297772..6224e70 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -486,7 +486,7 @@ int newbieTimeOut = 30; float loadAverageInc = 0.7; int simTimeOut = 45; int bulkSims = 0; -boolean DEBUG = TRUE; +boolean DEBUG = FALSE; qhashtbl_t *mimeTypes; qlist_t *dbRequests; @@ -523,6 +523,9 @@ void logMe(int v, char *format, ...) time_t curtime; char date[DATE_TIME_LEN]; + if ((!DEBUG) && (4 < v)) + return; + va_start(va, format); va_copy(va2, va); // How long is it? @@ -6848,7 +6851,7 @@ jit library is loaded or the JIT compiler will not be activated. } } DEBUG = configs->getint(configs, "debug"); - D("Setting DEBUG = %d", DEBUG); + I("Setting DEBUG = %d", DEBUG); if ((vd = configs->get (configs, "loadAverageInc", NULL, false)) != NULL) {loadAverageInc = *((float *) vd); D("Setting loadAverageInc = %f", loadAverageInc);} if ((vd = configs->get (configs, "simTimeOut", NULL, false)) != NULL) {simTimeOut = (int) *((float *) vd); D("Setting simTimeOut = %d", simTimeOut);} if ((vd = configs->get (configs, "bulkSims", NULL, false)) != NULL) {bulkSims = (int) *((float *) vd); D("Setting bulkSims = %d", bulkSims);} -- cgit v1.1