Splunk Integration with SpringBoot — Part 2

Amar Balu
The Fresh Writes
Published in
4 min readJan 26, 2023

--

In the previous part we have discussed about the Splunk Setup which we will be using to display our collected logs for Analysing.

Now let’s discuss about the SpringBoot Application setup. we are setting up the Student service.

Src

Implementation Example

In the Pom.xml we need to add the following dependencies to read the logs. In order the add the dependencies for the Spunk Logging we need it to add it in the form of Repositories as below. As we are using log4j for logging, we need to exclude the default logging given by spring-starter-web.

<repositories> 
<repository>
<id>splunk-artifactory</id>
<name>Splunk Releases</name>
<url>https://splunk.jfrog.io/splunk/ext-releases-local</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.splunk.logging</groupId>
<artifactId>splunk-library-javalogging</artifactId>
<version>1.8.0</version>
</dependency>
<dependency>…

--

--

Amar Balu
The Fresh Writes

I'm a front-end developer. I love React and Redux, Java, and Data Science. I write code for fun!. Join our publication : https://medium.com/thefreshwrites