<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Why am I unable to see springboot application logs in splunk? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-see-springboot-application-logs-in-splunk/m-p/624896#M107418</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have integrated Splunk HEC with springboot .when i hit application and checked in splunk am unable to see logs in splunk search with given index .am using source type as log4j2&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;below is my log4j2 xml file&lt;/P&gt;
&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;&amp;lt;Configuration&amp;gt;&lt;BR /&gt;&amp;lt;Appenders&amp;gt;&lt;BR /&gt;&amp;lt;Console name="console" target="SYSTEM_OUT"&amp;gt;&lt;BR /&gt;&amp;lt;PatternLayout&lt;BR /&gt;pattern="%style{%d{ISO8601}} %highlight{%-5level }[%style{%t}{bright,blue}] %style{%C{10}}{bright,yellow}: %msg%n%throwable" /&amp;gt;&lt;BR /&gt;&amp;lt;/Console&amp;gt;&lt;BR /&gt;&amp;lt;SplunkHttp&lt;BR /&gt;name="splunkhttp"&lt;BR /&gt;url="&lt;A href="https://localhost:8088" target="_blank" rel="noopener"&gt;https://localhost:8088&lt;/A&gt;"&lt;BR /&gt;token="xxxx-xxxx-xxxx-xxxx"&lt;BR /&gt;host="localhost"&lt;BR /&gt;index="vehicle-api_dev"&lt;BR /&gt;type="raw"&lt;BR /&gt;source="http-event-logs"&lt;BR /&gt;sourcetype="log4j"&lt;BR /&gt;messageFormat="text"&lt;BR /&gt;disableCertificateValidation="true"&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;lt;PatternLayout pattern="%m" /&amp;gt;&lt;BR /&gt;&amp;lt;/SplunkHttp&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/Appenders&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;Loggers&amp;gt;&lt;BR /&gt;&amp;lt;!-- LOG everything at INFO level --&amp;gt;&lt;BR /&gt;&amp;lt;Root level="info"&amp;gt;&lt;BR /&gt;&amp;lt;AppenderRef ref="console" /&amp;gt;&lt;BR /&gt;&amp;lt;AppenderRef ref="splunkhttp" /&amp;gt;&lt;BR /&gt;&amp;lt;/Root&amp;gt;&lt;BR /&gt;&amp;lt;/Loggers&amp;gt;&lt;BR /&gt;&amp;lt;/Configuration&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my pom.xml configurations related to splunk&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;dependency&amp;gt;&lt;BR /&gt;&amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;&lt;BR /&gt;&amp;lt;artifactId&amp;gt;spring-boot-starter-log4j2&amp;lt;/artifactId&amp;gt;&lt;BR /&gt;&amp;lt;/dependency&amp;gt;&lt;BR /&gt;&amp;lt;dependency&amp;gt;&lt;BR /&gt;&amp;lt;groupId&amp;gt;com.splunk.logging&amp;lt;/groupId&amp;gt;&lt;BR /&gt;&amp;lt;artifactId&amp;gt;splunk-library-javalogging&amp;lt;/artifactId&amp;gt;&lt;BR /&gt;&amp;lt;version&amp;gt;1.8.0&amp;lt;/version&amp;gt;&lt;BR /&gt;&amp;lt;scope&amp;gt;runtime&amp;lt;/scope&amp;gt;&lt;BR /&gt;&amp;lt;/dependency&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;repositories&amp;gt;&lt;BR /&gt;&amp;lt;repository&amp;gt;&lt;BR /&gt;&amp;lt;id&amp;gt;splunk-artifactory&amp;lt;/id&amp;gt;&lt;BR /&gt;&amp;lt;name&amp;gt;Splunk Releases&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;url&amp;gt;&lt;A href="https://splunk.jfrog.io/splunk/ext-releases-local" target="_blank" rel="noopener"&gt;https://splunk.jfrog.io/splunk/ext-releases-local&lt;/A&gt;&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;lt;/repository&amp;gt;&lt;BR /&gt;&amp;lt;/repositories&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am unable to see logs&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sindhuja_0-1671568387910.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/23095i8B87A93AA2DF2868/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sindhuja_0-1671568387910.png" alt="sindhuja_0-1671568387910.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can any one help me .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2022 04:50:18 GMT</pubDate>
    <dc:creator>sindhuja</dc:creator>
    <dc:date>2022-12-21T04:50:18Z</dc:date>
    <item>
      <title>Why am I unable to see springboot application logs in splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-see-springboot-application-logs-in-splunk/m-p/624896#M107418</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have integrated Splunk HEC with springboot .when i hit application and checked in splunk am unable to see logs in splunk search with given index .am using source type as log4j2&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;below is my log4j2 xml file&lt;/P&gt;
&lt;P&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;BR /&gt;&amp;lt;Configuration&amp;gt;&lt;BR /&gt;&amp;lt;Appenders&amp;gt;&lt;BR /&gt;&amp;lt;Console name="console" target="SYSTEM_OUT"&amp;gt;&lt;BR /&gt;&amp;lt;PatternLayout&lt;BR /&gt;pattern="%style{%d{ISO8601}} %highlight{%-5level }[%style{%t}{bright,blue}] %style{%C{10}}{bright,yellow}: %msg%n%throwable" /&amp;gt;&lt;BR /&gt;&amp;lt;/Console&amp;gt;&lt;BR /&gt;&amp;lt;SplunkHttp&lt;BR /&gt;name="splunkhttp"&lt;BR /&gt;url="&lt;A href="https://localhost:8088" target="_blank" rel="noopener"&gt;https://localhost:8088&lt;/A&gt;"&lt;BR /&gt;token="xxxx-xxxx-xxxx-xxxx"&lt;BR /&gt;host="localhost"&lt;BR /&gt;index="vehicle-api_dev"&lt;BR /&gt;type="raw"&lt;BR /&gt;source="http-event-logs"&lt;BR /&gt;sourcetype="log4j"&lt;BR /&gt;messageFormat="text"&lt;BR /&gt;disableCertificateValidation="true"&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;lt;PatternLayout pattern="%m" /&amp;gt;&lt;BR /&gt;&amp;lt;/SplunkHttp&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;/Appenders&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;Loggers&amp;gt;&lt;BR /&gt;&amp;lt;!-- LOG everything at INFO level --&amp;gt;&lt;BR /&gt;&amp;lt;Root level="info"&amp;gt;&lt;BR /&gt;&amp;lt;AppenderRef ref="console" /&amp;gt;&lt;BR /&gt;&amp;lt;AppenderRef ref="splunkhttp" /&amp;gt;&lt;BR /&gt;&amp;lt;/Root&amp;gt;&lt;BR /&gt;&amp;lt;/Loggers&amp;gt;&lt;BR /&gt;&amp;lt;/Configuration&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my pom.xml configurations related to splunk&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;dependency&amp;gt;&lt;BR /&gt;&amp;lt;groupId&amp;gt;org.springframework.boot&amp;lt;/groupId&amp;gt;&lt;BR /&gt;&amp;lt;artifactId&amp;gt;spring-boot-starter-log4j2&amp;lt;/artifactId&amp;gt;&lt;BR /&gt;&amp;lt;/dependency&amp;gt;&lt;BR /&gt;&amp;lt;dependency&amp;gt;&lt;BR /&gt;&amp;lt;groupId&amp;gt;com.splunk.logging&amp;lt;/groupId&amp;gt;&lt;BR /&gt;&amp;lt;artifactId&amp;gt;splunk-library-javalogging&amp;lt;/artifactId&amp;gt;&lt;BR /&gt;&amp;lt;version&amp;gt;1.8.0&amp;lt;/version&amp;gt;&lt;BR /&gt;&amp;lt;scope&amp;gt;runtime&amp;lt;/scope&amp;gt;&lt;BR /&gt;&amp;lt;/dependency&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;lt;repositories&amp;gt;&lt;BR /&gt;&amp;lt;repository&amp;gt;&lt;BR /&gt;&amp;lt;id&amp;gt;splunk-artifactory&amp;lt;/id&amp;gt;&lt;BR /&gt;&amp;lt;name&amp;gt;Splunk Releases&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;lt;url&amp;gt;&lt;A href="https://splunk.jfrog.io/splunk/ext-releases-local" target="_blank" rel="noopener"&gt;https://splunk.jfrog.io/splunk/ext-releases-local&lt;/A&gt;&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;lt;/repository&amp;gt;&lt;BR /&gt;&amp;lt;/repositories&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am unable to see logs&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sindhuja_0-1671568387910.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/23095i8B87A93AA2DF2868/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sindhuja_0-1671568387910.png" alt="sindhuja_0-1671568387910.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can any one help me .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 04:50:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-am-I-unable-to-see-springboot-application-logs-in-splunk/m-p/624896#M107418</guid>
      <dc:creator>sindhuja</dc:creator>
      <dc:date>2022-12-21T04:50:18Z</dc:date>
    </item>
  </channel>
</rss>

