@Override
    protected StateFactory init(MetaStreamEvent metaStreamEvent, AbstractDefinition inputDefinition,
                                ExpressionExecutor[] attributeExpressionExecutors, ConfigReader configReader,
                                StreamEventClonerHolder streamEventClonerHolder,
                                boolean outputExpectsExpiredEvents, boolean findToBeExecuted,
                                SiddhiQueryContext siddhiQueryContext) {
        int inputExecutorLength = attributeExpressionExecutors.length;
        if (inputExecutorLength == 1) {
            if (attributeExpressionExecutors[0].getReturnType() == Attribute.Type.STRING) {
                logMessageExpressionExecutor = attributeExpressionExecutors[0];
            } else if (attributeExpressionExecutors[0].getReturnType() == Attribute.Type.BOOL) {
                isLogEventExpressionExecutor = attributeExpressionExecutors[0];
            } else {
                throw new SiddhiAppValidationException("Input attribute is expected to be 'isEventLogged (Bool)' " +
                        "or 'logMessage (String)' or 'isEventLogged (Bool), logMessage (String)' or 'priority " +
                        "(String), isEventLogged (Bool), logMessage (String)', but its 1st attribute is " +
                        attributeExpressionExecutors[0].getReturnType());
            }
        } else if (inputExecutorLength == 2) {
            if (attributeExpressionExecutors[0].getReturnType() == Attribute.Type.STRING &&
                    attributeExpressionExecutors[1].getReturnType() == Attribute.Type.BOOL) {
                logMessageExpressionExecutor = attributeExpressionExecutors[0];
                isLogEventExpressionExecutor = attributeExpressionExecutors[1];
            } else if (attributeExpressionExecutors[0].getReturnType() == Attribute.Type.STRING &&
                    attributeExpressionExecutors[1].getReturnType() == Attribute.Type.STRING) {
                if (attributeExpressionExecutors[0] instanceof ConstantExpressionExecutor) {
                    logPriority = LogPriority.valueOf(((String) attributeExpressionExecutors[0].execute(null))
                            .toUpperCase());
                } else {
                    logPriorityExpressionExecutor = attributeExpressionExecutors[0];
                }
                logMessageExpressionExecutor = attributeExpressionExecutors[1];
            } else {
                throw new SiddhiAppValidationException("Input attribute is expected to be 'logMessage (String), " +
                        "isEventLogged (Bool)' or 'priority (String), logMessage (String)', but its returning are '"
                        + attributeExpressionExecutors[0].getReturnType() + ", " + attributeExpressionExecutors[1]
                        .getReturnType() + "'");
            }
        } else if (inputExecutorLength == 3) {
            if (attributeExpressionExecutors[0].getReturnType() == Attribute.Type.STRING) {
                if (attributeExpressionExecutors[0] instanceof ConstantExpressionExecutor) {
                    logPriority = LogPriority.valueOf(((String) attributeExpressionExecutors[0].execute(null))
                            .toUpperCase());
                } else {
                    logPriorityExpressionExecutor = attributeExpressionExecutors[0];
                }
            } else {
                throw new SiddhiAppValidationException("Input attribute is expected to be 'priority (String), " +
                        "logMessage (String), isEventLogged (Bool)', but its 1st attribute is returning " +
                        attributeExpressionExecutors[0].getReturnType());
            }
            if (attributeExpressionExecutors[1].getReturnType() == Attribute.Type.STRING) {
                logMessageExpressionExecutor = attributeExpressionExecutors[1];
            } else {
                throw new SiddhiAppValidationException("Input attribute is expected to be 'priority (String), " +
                        "logMessage (String), isEventLogged (Bool)', but its 2nd attribute is returning " +
                        attributeExpressionExecutors[1].getReturnType());
            }
            if (attributeExpressionExecutors[2].getReturnType() == Attribute.Type.BOOL) {
                isLogEventExpressionExecutor = attributeExpressionExecutors[2];
            } else {
                throw new SiddhiAppValidationException("Input attribute is expected to be 'priority (String), " +
                        "logMessage (String), isEventLogged (Bool)', but its 3rd attribute is returning " +
                        attributeExpressionExecutors[2].getReturnType());
            }
        } else if (inputExecutorLength > 3) {
            throw new SiddhiAppValidationException("Input parameters for Log can be logMessage (String), " +
                    "isEventLogged (Bool), but there are " + attributeExpressionExecutors.length + " in the input!");
        }
        logPrefix = siddhiQueryContext.getSiddhiAppContext().getName() + ": ";
        return null;
    }
The init method of the StreamFunction

@param metaStreamEvent              the  stream event meta
@param inputDefinition              the incoming stream definition
@param attributeExpressionExecutors the executors for the function parameters
@param configReader                 this hold the {@link LogStreamProcessor} configuration reader.
@param streamEventClonerHolder      streamEventCloner Holder
@param findToBeExecuted             find will be executed
@param siddhiQueryContext           current siddhi query context
@return the additional output attributes introduced by the function
modules/siddhi-core/src/main/java/io/siddhi/core/query/processor/stream/LogStreamProcessor.java