- type = SlcExecutionStep.INFO;
-
- SlcExecutionStep step = new SlcExecutionStep(new Date(event
- .getTimeStamp()), type, layout.format(event));
-
- ((ProcessThreadGroup) currentThread.getThreadGroup())
- .dispatchAddStep(step);
+ type = ExecutionStep.INFO;
+
+ ExecutionStep step = new ExecutionStep(event.getLoggerName(),
+ new Date(event.getTimeStamp()), type, event.getMessage()
+ .toString());
+
+ try {
+ dispatching.set(true);
+ BlockingQueue<ExecutionStep> steps = ((ProcessThreadGroup) currentThread
+ .getThreadGroup()).getSteps();
+ if (steps.remainingCapacity() == 0) {
+ stdOut("WARNING: execution steps queue is full, skipping step: "
+ + step);
+ // FIXME understand why it block indefinitely: the queue
+ // should be emptied by the logging thread
+ } else {
+ steps.add(step);
+ }
+ } finally {
+ dispatching.set(false);
+ }