01: package velosurf.util;
02:
03: import org.apache.velocity.runtime.RuntimeServices;
04: import org.apache.velocity.runtime.log.LogChute;
05:
06: public class VelosurfLogChute implements LogChute {
07:
08: public void init(RuntimeServices rs) throws Exception {
09: }
10:
11: public void log(int level, String message) {
12: Logger.log(level + 1, message);
13: }
14:
15: public void log(int level, String message, Throwable t) {
16: Logger.log(message, t);
17: }
18:
19: public boolean isLevelEnabled(int level) {
20: return Logger.getLogLevel() - 1 <= level;
21: }
22:
23: }
|