Install Splunk logging for Java

You have several options for how to obtain Splunk logging for Java:

Maven

You can add the Splunk logging for Java library to your project by using Maven. Here’s a snippet from a pom.xml file that integrates the Splunk logging for Java library version 1.5.0 into a project. Be sure to update the version number to correspond to the latest version of Splunk logging for Java.

    <repositories> 
        <repository> 
            <id>splunk-artifactory</id> 
            <name>Splunk Releases</name> 
            <url>http://splunk.artifactoryonline.com/splunk/ext-releases-local</url> 
        </repository> 
    </repositories> 
  
    <dependencies> 
        <dependency> 
            <groupId>com.splunk.logging</groupId> 
            <artifactId>splunk-library-javalogging</artifactId> 
            <version>1.5.0</version> 
        </dependency> 
    </dependencies>

Download the .JAR

You can also add a pre-built .JAR file to your project. Just download it from http://dev.splunk.com/goto/loggingjavajar, and then add it to your project as a dependency. To verify the file's integrity, download the MD5 or download the SHA-512.

Download and build the source

You can download and build the entire Splunk logging for Java package, which includes the example configuration files that are discussed in Configure your logging system. Download the Splunk logging for Java source from http://dev.splunk.com/goto/loggingjava. To verify the file's integrity, download the MD5 or download the SHA-512.

Clone the repo

If you want to contribute to the Splunk logging for Java project, you can clone the GitHub repo: https://github.com/splunk/splunk-library-javalogging.