* Set event-log loglevel to DEBUG if debug=true in app.properties.
This commit is contained in:
parent
9cbe269390
commit
a3fa56750c
1 changed files with 11 additions and 0 deletions
|
@ -1416,6 +1416,11 @@ public final class Application implements IPathElement, Runnable {
|
||||||
Log getEventLog() {
|
Log getEventLog() {
|
||||||
if (eventLog == null) {
|
if (eventLog == null) {
|
||||||
eventLog = getLogger(eventLogName);
|
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;
|
return eventLog;
|
||||||
}
|
}
|
||||||
|
@ -1857,10 +1862,16 @@ public final class Application implements IPathElement, Runnable {
|
||||||
logDir = props.getProperty("logdir", "log");
|
logDir = props.getProperty("logdir", "log");
|
||||||
if (System.getProperty("helma.logdir") == null) {
|
if (System.getProperty("helma.logdir") == null) {
|
||||||
// set up helma.logdir system property in case we're using it
|
// 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);
|
File dir = new File(logDir);
|
||||||
System.setProperty("helma.logdir", dir.getAbsolutePath());
|
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
|
// set prop read timestamp
|
||||||
lastPropertyRead = props.lastModified();
|
lastPropertyRead = props.lastModified();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue