From a3fa56750c3ab2a8aabfe2b6dd1f6101a7d23933 Mon Sep 17 00:00:00 2001 From: hns Date: Fri, 13 Jan 2006 13:21:40 +0000 Subject: [PATCH] * Set event-log loglevel to DEBUG if debug=true in app.properties. --- src/helma/framework/core/Application.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/helma/framework/core/Application.java b/src/helma/framework/core/Application.java index 46e717bb..2040421b 100644 --- a/src/helma/framework/core/Application.java +++ b/src/helma/framework/core/Application.java @@ -1416,6 +1416,11 @@ public final class Application implements IPathElement, Runnable { Log getEventLog() { if (eventLog == null) { eventLog = getLogger(eventLogName); + // set log level for event log in case it is a helma.util.Logger + if (eventLog instanceof Logger) { + ((Logger) eventLog).setLogLevel(debug ? Logger.DEBUG : Logger.INFO); + } + } return eventLog; } @@ -1857,10 +1862,16 @@ public final class Application implements IPathElement, Runnable { logDir = props.getProperty("logdir", "log"); if (System.getProperty("helma.logdir") == null) { // set up helma.logdir system property in case we're using it + // FIXME: this sets a global System property, should be per-app File dir = new File(logDir); System.setProperty("helma.logdir", dir.getAbsolutePath()); } + // set log level for event log in case it is a helma.util.Logger + if (eventLog instanceof Logger) { + ((Logger) eventLog).setLogLevel(debug ? Logger.DEBUG : Logger.INFO); + } + // set prop read timestamp lastPropertyRead = props.lastModified(); }