Adding logError() methods.
This commit is contained in:
parent
2185848e6c
commit
e512386e9a
1 changed files with 24 additions and 2 deletions
|
@ -1176,13 +1176,13 @@ public final class Application implements IPathElement, Runnable {
|
||||||
if (args == null) {
|
if (args == null) {
|
||||||
args = new Object[0];
|
args = new Object[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reval != null) {
|
if (reval != null) {
|
||||||
try {
|
try {
|
||||||
return reval.invokeDirectFunction(obj, func, args);
|
return reval.invokeDirectFunction(obj, func, args);
|
||||||
} catch (Exception x) {
|
} catch (Exception x) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
System.err.println("Error in Application.invokeFunction (" +
|
System.err.println("Error in Application.invokeFunction (" +
|
||||||
func + "): " + x);
|
func + "): " + x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1316,6 +1316,28 @@ public final class Application implements IPathElement, Runnable {
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log an application error
|
||||||
|
*/
|
||||||
|
public void logError(String msg, Throwable error) {
|
||||||
|
if (eventLog == null) {
|
||||||
|
eventLog = getLogger(eventLogName);
|
||||||
|
}
|
||||||
|
|
||||||
|
eventLog.error(msg, error);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log an application error
|
||||||
|
*/
|
||||||
|
public void logError(String msg) {
|
||||||
|
if (eventLog == null) {
|
||||||
|
eventLog = getLogger(eventLogName);
|
||||||
|
}
|
||||||
|
|
||||||
|
eventLog.error(msg);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Log a generic application event
|
* Log a generic application event
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue