Mercurial > hg > digilib-old
comparison servlet/src/digilib/Utils.java @ 59:8d9a0abf3626
Utils now has a setter for debugLevel. DocumentBean now properly sets
the debug level.
New class DigilibRequest as an object to represent a request. Mostly for
use in JSP as a local object.
(ROC)
author | robcast |
---|---|
date | Wed, 28 Aug 2002 20:00:21 +0200 |
parents | 0ff3ede32060 |
children | d493563ef672 |
comparison
equal
deleted
inserted
replaced
58:2d8ed5252eb0 | 59:8d9a0abf3626 |
---|---|
26 } | 26 } |
27 | 27 |
28 public Utils(int dbg) { | 28 public Utils(int dbg) { |
29 debugLevel = dbg; | 29 debugLevel = dbg; |
30 } | 30 } |
31 | 31 |
32 public static int debugLevel = 10; | |
33 public void setDebugLevel(int lvl) { | |
34 debugLevel = lvl; | |
35 } | |
36 public int getDebugLevel() { | |
37 return debugLevel; | |
38 } | |
39 | |
32 /** | 40 /** |
33 * Debugging help | 41 * Debugging help |
34 * dprintln(1, "blabla"); | 42 * dprintln(1, "blabla"); |
35 * will be printed on stdout if debug >= 1 | 43 * will be printed on stdout if debug >= 1 |
36 */ | 44 */ |
37 public static int debugLevel = 10; | |
38 public static void dprintln(int dbg, String s) { | 45 public static void dprintln(int dbg, String s) { |
39 if (debugLevel >= dbg) { | 46 if (debugLevel >= dbg) { |
40 String ind = ""; | 47 String ind = ""; |
41 // indent by debuglevel | 48 // indent by debuglevel |
42 for (int i = 0; i < dbg; i++) { | 49 for (int i = 0; i < dbg; i++) { |