<?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: Why am I unable to set up logging to debug my python script? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Why-am-I-unable-to-set-up-logging-to-debug-my-python-script/m-p/203364#M2726</link>
    <description>&lt;P&gt;Hi clorne,&lt;/P&gt;

&lt;P&gt;did you &lt;CODE&gt;import logging&lt;/CODE&gt; in your script as stated in the example? &lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Wed, 11 Nov 2015 20:28:21 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2015-11-11T20:28:21Z</dc:date>
    <item>
      <title>Why am I unable to set up logging to debug my python script?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-am-I-unable-to-set-up-logging-to-debug-my-python-script/m-p/203363#M2725</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to activate the logging in order to debug my python script.&lt;BR /&gt;
I have followed the documentation located at:&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.0/AdvancedDev/ModInputsLog"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.0/AdvancedDev/ModInputsLog&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;SPLUNK_HOME/etc/log.cfg had already category.ExecProcessor=INFO&lt;/P&gt;

&lt;P&gt;And the code is basically the same as the example:&lt;/P&gt;

&lt;H1&gt;set up logging suitable for splunkd consumption&lt;/H1&gt;

&lt;PRE&gt;&lt;CODE&gt;logging.root
logging.root.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(levelname)s %(message)s')
handler = logging.StreamHandler(stream=sys.stderr)
handler.setFormatter(formatter)
logging.root.addHandler(handler)
logging.info("LOGGING INFO HELLO.")
logging.debug("LOGGING DEBUG HELLO")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My entry is not logged in &lt;CODE&gt;SPLUNK_HOME/var/log/splunk/splunkd.log&lt;/CODE&gt;&lt;BR /&gt;
I have no index=_internal ExecProcessor. &lt;BR /&gt;
I found an index names splunklogger, but it does not contain any event.&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2015 07:45:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-am-I-unable-to-set-up-logging-to-debug-my-python-script/m-p/203363#M2725</guid>
      <dc:creator>clorne</dc:creator>
      <dc:date>2015-10-22T07:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to set up logging to debug my python script?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-am-I-unable-to-set-up-logging-to-debug-my-python-script/m-p/203364#M2726</link>
      <description>&lt;P&gt;Hi clorne,&lt;/P&gt;

&lt;P&gt;did you &lt;CODE&gt;import logging&lt;/CODE&gt; in your script as stated in the example? &lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 11 Nov 2015 20:28:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-am-I-unable-to-set-up-logging-to-debug-my-python-script/m-p/203364#M2726</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-11-11T20:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to set up logging to debug my python script?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-am-I-unable-to-set-up-logging-to-debug-my-python-script/m-p/203365#M2727</link>
      <description>&lt;P&gt;Hello MuS,&lt;BR /&gt;
Yes I did.&lt;BR /&gt;
Is the logging working correctly with the procedure provided by Splunk documentation?&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 08:02:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-am-I-unable-to-set-up-logging-to-debug-my-python-script/m-p/203365#M2727</guid>
      <dc:creator>clorne</dc:creator>
      <dc:date>2015-11-12T08:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why am I unable to set up logging to debug my python script?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Why-am-I-unable-to-set-up-logging-to-debug-my-python-script/m-p/203366#M2728</link>
      <description>&lt;P&gt;Yes, that's the way to log events from your script into &lt;CODE&gt;splunkd.log&lt;/CODE&gt;. Here is another example &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.3.0/AdvancedDev/ModInputsExample"&gt;http://docs.splunk.com/Documentation/Splunk/6.3.0/AdvancedDev/ModInputsExample&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Nov 2015 08:31:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Why-am-I-unable-to-set-up-logging-to-debug-my-python-script/m-p/203366#M2728</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2015-11-12T08:31:20Z</dc:date>
    </item>
  </channel>
</rss>

