Class LogSink

  • All Implemented Interfaces:
    SinkListener

    public class LogSink
    extends Sink
    Implementation of 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
    • Constructor Detail

      • LogSink

        public LogSink()
    • Method Detail

      • exposeServiceDeploymentInfo

        protected ServiceDeploymentInfo exposeServiceDeploymentInfo()
        Description copied from class: Sink
        Give information to the deployment about the service exposed by the sink.
        Specified by:
        exposeServiceDeploymentInfo in class Sink
        Returns:
        ServiceDeploymentInfo Service related information to the deployment
      • getSupportedDynamicOptions

        public String[] getSupportedDynamicOptions()
        Description copied from class: Sink
        Supported dynamic options by the transport
        Specified by:
        getSupportedDynamicOptions in class Sink
        Returns:
        the list of supported dynamic option keys
      • init

        protected StateFactory<State> init​(io.siddhi.query.api.definition.StreamDefinition outputStreamDefinition,
                                           OptionHolder optionHolder,
                                           ConfigReader sinkConfigReader,
                                           SiddhiAppContext siddhiAppContext)
        Description copied from class: Sink
        Will be called for initialing the Sink
        Specified by:
        init in class Sink
        Parameters:
        outputStreamDefinition - containing stream definition bind to the Sink
        optionHolder - Option holder containing static and dynamic options related to the Sink
        sinkConfigReader - this hold the Sink extensions configuration reader.
        siddhiAppContext - SiddhiAppContext of the parent siddhi app.
      • disconnect

        public void disconnect()
        Description copied from class: Sink
        Called after all publishing is done, or when ConnectionUnavailableException is thrown
        Specified by:
        disconnect in class Sink
      • destroy

        public void destroy()
        Description copied from class: Sink
        Called at the end to clean all the resources consumed
        Specified by:
        destroy in class Sink