<?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 Re: Send .log using logback.xml to splunk in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Is-this-the-proper-approach-to-sending-log-using-logback-xml-to/m-p/620723#M106942</link>
    <description>&lt;P&gt;I have exactly the same issue with logback. I have defined sourcetype as logback. Do we have any solution about it ?&lt;/P&gt;</description>
    <pubDate>Mon, 14 Nov 2022 09:46:35 GMT</pubDate>
    <dc:creator>igiannop</dc:creator>
    <dc:date>2022-11-14T09:46:35Z</dc:date>
    <item>
      <title>Is this the proper approach to sending .log using logback.xml to Splunk?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-this-the-proper-approach-to-sending-log-using-logback-xml-to/m-p/469434#M80765</link>
      <description>&lt;P&gt;Hello. I'm trying to integrate splunk with my local project developed in Java.&lt;/P&gt;
&lt;P&gt;I have a main project called send-data-service while on the other hand, I have a project named utilities which includes the logging utility that can be re-used by my other projects. Every time send-data-service logs information, it calls the utility service. All of these works fine and also logs information and errors using a logback.xml. This then generates a .log file.&lt;/P&gt;
&lt;P&gt;Now, I've read that I should use a splunk logback appender in my current logback.xml so as I can send data to my splunk server (which is hosted via virtual box) every time I try to make a request inside my send-data-service. Although I can't actually make it work. I've already setup a HEC inside splunk but it still does not receive any data. My goal is to send the whole .log file to my splunk server.&lt;/P&gt;
&lt;P&gt;This is the content of my logback.xml:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;appender name="http"
            class="com.splunk.logging.HttpEventCollectorLogbackAppender"&amp;gt;
            &amp;lt;url&amp;gt;http://localhost:8089&amp;lt;/url&amp;gt;
            &amp;lt;token&amp;gt;$token-generated$&amp;lt;/token&amp;gt;
            &amp;lt;source&amp;gt;send-data-service&amp;lt;/source&amp;gt;
            &amp;lt;sourcetype&amp;gt;logback&amp;lt;/sourcetype&amp;gt;
            &amp;lt;messageFormat&amp;gt;text&amp;lt;/messageFormat&amp;gt;
            &amp;lt;middleware&amp;gt;HttpEventCollectorUnitTestMiddleware&amp;lt;/middleware&amp;gt;
            &amp;lt;layout class="ch.qos.logback.classic.PatternLayout"&amp;gt;
                &amp;lt;pattern&amp;gt;%logger: %msg%n&amp;lt;/pattern&amp;gt;
            &amp;lt;/layout&amp;gt;
        &amp;lt;/appender&amp;gt;

        &amp;lt;logger name="splunk.logger" additivity="false" level="INFO"&amp;gt;
            &amp;lt;appender-ref ref="http" /&amp;gt;
        &amp;lt;/logger
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I would just also like to ask if i'm using a proper approach? I'm just new in using splunk and I'm really quite lost. Hope anyone can help me with this. Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 13:20:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-this-the-proper-approach-to-sending-log-using-logback-xml-to/m-p/469434#M80765</guid>
      <dc:creator>juliennerocafor</dc:creator>
      <dc:date>2022-11-14T13:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Send .log using logback.xml to splunk</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Is-this-the-proper-approach-to-sending-log-using-logback-xml-to/m-p/620723#M106942</link>
      <description>&lt;P&gt;I have exactly the same issue with logback. I have defined sourcetype as logback. Do we have any solution about it ?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 09:46:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Is-this-the-proper-approach-to-sending-log-using-logback-xml-to/m-p/620723#M106942</guid>
      <dc:creator>igiannop</dc:creator>
      <dc:date>2022-11-14T09:46:35Z</dc:date>
    </item>
  </channel>
</rss>

