use of com.walmartlabs.concord.runtime.v2.runner.logging.LogContext in project concord by walmartlabs.
the class StepCommand method eval.
@Override
public void eval(Runtime runtime, State state, ThreadId threadId) {
ContextFactory contextFactory = runtime.getService(ContextFactory.class);
T step = getStep();
UUID correlationId = getCorrelationId();
Context ctx = contextFactory.create(runtime, state, threadId, step, correlationId);
LogContext logContext = getLogContext(runtime, ctx, correlationId);
if (logContext == null) {
executeWithContext(ctx, runtime, state, threadId);
} else {
runtime.getService(RunnerLogger.class).withContext(logContext, () -> executeWithContext(ctx, runtime, state, threadId));
}
}
Aggregations