if (nameaddition == null || nameaddition.isEmpty()) {
nameaddition = "";
} else {
nameaddition = "_" + nameaddition;
}
Controller ctl = ctx.getController();
if (ctl == null) {
throw new GateRuntimeException(
"Controller is null - cannot retrieve the ActionContext PrintStream");
}
PrintStream ps = (PrintStream) ctl.getFeatures().get("$$logstream"+nameaddition);
if (ps == null) {
throw new GateRuntimeException("No log outstream found!");
}
return ps;
}