@Override
    public void publish(Object payload, DynamicOptions transportOptions, State s)
            throws ConnectionUnavailableException {
        String message;
        if (payload instanceof Object[]) {
            message = logPrefix + " : " + Arrays.deepToString((Object[]) payload);
        } else {
            message = logPrefix + " : " + payload;
        }
        logMessage(logPriority, message);
    }
Implementation of {@link Sink} which can be used as a logger. This will log the output events in the output stream
with user specified priority and a prefix
modules/siddhi-core/src/main/java/io/siddhi/core/stream/output/sink/LogSink.java