working on logging

This commit is contained in:
Stephan Richter
2020-12-26 18:45:42 +01:00
parent 0bd93e8614
commit e042f7d1c1
4 changed files with 23 additions and 13 deletions

View File

@@ -94,7 +94,7 @@ public class Application extends BaseClass{
* @throws SecurityException
*/
private static Object handle(HashMap<String, String> params) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {
LOG.debug("Application.handle({})",params);
String realm = params.get(REALM);
if (realm == null) throw new NullPointerException(REALM+" should not be null!");
@@ -241,7 +241,11 @@ public class Application extends BaseClass{
}
Object response = handle(params);
if (isSet(response)) LOG.debug("response ({}): {}",response.getClass().getSimpleName(),response);
if (isSet(response)) {
if (response instanceof Tag) {
LOG.debug("response ({}): {}",response.getClass().getSimpleName(),response.toString().substring(0,30)+"...");
} else LOG.debug("response ({}): {}",response.getClass().getSimpleName(),response);
}
send(client,response instanceof String || response instanceof Tag ? response : plan.html());
} catch (Exception e) {

View File

@@ -442,7 +442,6 @@ public class Route extends BaseClass {
if (!train.onTrace(startBlock)) startBlock.setTrain(null);
}
train = null;
triggeredContacts.clear();
}
public boolean fireSetupActions() {
@@ -822,7 +821,6 @@ public class Route extends BaseClass {
train = null;
}
LOG.debug("chlearing triggeredContacts of {}",this);
triggeredContacts.clear();
state = State.FREE;
return true;
}
@@ -884,6 +882,7 @@ public class Route extends BaseClass {
ActionList startActions = triggeredActions.get(ROUTE_START);
if (isSet(startActions) && !startActions.fire(context)) return false; // start actions failed
state = State.STARTED;
triggeredContacts.clear();
return true;
}