public void logTaskRun(TaskRun taskRun, Logger logger, Level level, String message, Object... args) {
        String prefix = tenantEnabled ? TASKRUN_PREFIX_WITH_TENANT : TASKRUN_PREFIX_NO_TENANT;
        String finalMsg = taskRun.getValue() == null ? prefix + message : prefix + "[value: {}] " + message;
        Object[] executionArgs = tenantEnabled ?
            new Object[] { taskRun.getTenantId(), taskRun.getNamespace(), taskRun.getFlowId(), taskRun.getTaskId(), taskRun.getExecutionId(), taskRun.getId() } :
            new Object[] { taskRun.getNamespace(), taskRun.getFlowId(), taskRun.getTaskId(), taskRun.getExecutionId(), taskRun.getId() };
        if (taskRun.getValue() != null) {
            executionArgs = ArrayUtils.add(executionArgs, taskRun.getValue());
        }
        Object[] finalArgs = ArrayUtils.addAll(executionArgs, args);
        logger.atLevel(level).log(finalMsg, finalArgs);
    }
@Test
    void logTaskRun() {
        var taskRun = TaskRun.builder().namespace("namespace").flowId("flow").executionId("execution").taskId("task").id("taskRun").build();
        logService.logTaskRun(taskRun, log, Level.INFO, "Some log");
        logService.logTaskRun(taskRun, log, Level.INFO, "Some log with an {}", "attribute");

        taskRun = TaskRun.builder().namespace("namespace").flowId("flow").executionId("execution").taskId("task").id("taskRun").value("value").build();
        logService.logTaskRun(taskRun, log, Level.INFO, "Some log");
        logService.logTaskRun(taskRun, log, Level.INFO, "Some log with an {}", "attribute");
    }