Class SplunkLogService

java.lang.Object
com.splunk.splunkjenkins.utils.SplunkLogService

public class SplunkLogService extends Object
  • Field Details

    • LOG

      public static final Logger LOG
  • Method Details

    • getInstance

      public static SplunkLogService getInstance()
    • send

      public boolean send(Object message)
      Parameters:
      message - the message to send
      Returns:
      true if enqueue successfully, false if the message is discarded
    • send

      public boolean send(Object message, String sourceName)
      Parameters:
      message - the message to send
      sourceName - the source for splunk metadata
      Returns:
      true if enqueue successfully, false if the message is discarded
    • send

      public boolean send(Object message, EventType eventType)
      Parameters:
      message - the message to send, will use CONSOLE_LOG's config
      eventType - the type of event, @see EventType
      Returns:
      true if enqueue successfully, false if the message is discarded
    • sendBatch

      public boolean sendBatch(Collection<? extends Object> messages, EventType eventType)
      Parameters:
      messages - the messages to send
      eventType - the type of event, @see EventType
      Returns:
      true if enqueue successfully, false if some message are discarded
    • send

      public boolean send(Object message, EventType eventType, String sourceName)
      Parameters:
      message - the message to send
      eventType - the type of event, @see EventType
      sourceName - the source for splunk metadata
      Returns:
      true if enqueue successfully, false if the message is discarded
    • enqueue

      public boolean enqueue(EventRecord record)
    • stopWorker

      public void stopWorker()
    • releaseConnection

      public void releaseConnection()
    • getSentCount

      public long getSentCount()
    • getQueueSize

      public long getQueueSize()
    • getClient

      public shaded.splk.org.apache.http.client.HttpClient getClient()
    • getStats

      public String getStats()