<?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 is setting up INFO Logging entries from custom modular inputs showing up as ERROR in splunkd? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-setting-up-INFO-Logging-entries-from-custom-modular/m-p/247573#M47757</link>
    <description>&lt;P&gt;That resolves it for modular inputs thank you.&lt;/P&gt;

&lt;P&gt;It doesn't appear to help with custom setup handlers though.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;01-23-2017 08:12:45.396 +1000 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python /opt/splunk/bin/runScript.py setup':  INFO myapp=1,type=setup,starting
01-23-2017 08:12:44.788 +1000 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python /opt/splunk/bin/runScript.py setup':  INFO myapp=1,type=setup,starting
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From this custom endpoint&lt;BR /&gt;
&lt;A href="http://pastebin.com/2zMM8sak"&gt;http://pastebin.com/2zMM8sak&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 22 Jan 2017 22:20:07 GMT</pubDate>
    <dc:creator>phoenixdigital</dc:creator>
    <dc:date>2017-01-22T22:20:07Z</dc:date>
    <item>
      <title>Why is setting up INFO Logging entries from custom modular inputs showing up as ERROR in splunkd?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-setting-up-INFO-Logging-entries-from-custom-modular/m-p/247571#M47755</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;So following the instructions here&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.1/AdvancedDev/ModInputsLog"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.1/AdvancedDev/ModInputsLog&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;logging.root
logging.root.setLevel(logging.DEBUG) 
formatter = logging.Formatter('%(levelname)s,myapp=1,%(message)s')
handler = logging.StreamHandler(stream=sys.stderr)
handler.setFormatter(formatter)
logging.root.addHandler(handler)

# Turn down requests from spamming Splunkd logs
logging.getLogger("requests").setLevel(logging.WARNING)


logging.info("Started the Modular Input here")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This shows up in Splunkd as an ERROR in ExecProcessor&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;01-20-2017 15:01:46.147 +1000 ERROR ExecProcessor - message from "python /opt/splunk/etc/apps/myapp/bin/json_api.py" INFO,myapp=1,Started the Modular Input here
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As you can see the submessage is correctly marked as INFO however the parent loglevel for splunkd is ERROR.&lt;/P&gt;

&lt;P&gt;Is there any way to get this to show up as INFO for the splunkd.log?&lt;/P&gt;

&lt;P&gt;Showing up as ERROR for splunkd is not right at all.&lt;/P&gt;

&lt;P&gt;I tried using sys.stdout but that broke the whole thing for obvious reasons.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; handler = logging.StreamHandler(stream=sys.stdout)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jan 2017 05:12:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-setting-up-INFO-Logging-entries-from-custom-modular/m-p/247571#M47755</guid>
      <dc:creator>phoenixdigital</dc:creator>
      <dc:date>2017-01-20T05:12:40Z</dc:date>
    </item>
    <item>
      <title>Re: Why is setting up INFO Logging entries from custom modular inputs showing up as ERROR in splunkd?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-setting-up-INFO-Logging-entries-from-custom-modular/m-p/247572#M47756</link>
      <description>&lt;P&gt;ERROR is the default if no level is specified, whap happens if you change your format do that instead of a comma immediately after levelname you put a space instead?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2017 13:08:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-setting-up-INFO-Logging-entries-from-custom-modular/m-p/247572#M47756</guid>
      <dc:creator>acharlieh</dc:creator>
      <dc:date>2017-01-20T13:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why is setting up INFO Logging entries from custom modular inputs showing up as ERROR in splunkd?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Why-is-setting-up-INFO-Logging-entries-from-custom-modular/m-p/247573#M47757</link>
      <description>&lt;P&gt;That resolves it for modular inputs thank you.&lt;/P&gt;

&lt;P&gt;It doesn't appear to help with custom setup handlers though.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;01-23-2017 08:12:45.396 +1000 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python /opt/splunk/bin/runScript.py setup':  INFO myapp=1,type=setup,starting
01-23-2017 08:12:44.788 +1000 ERROR ScriptRunner - stderr from '/opt/splunk/bin/python /opt/splunk/bin/runScript.py setup':  INFO myapp=1,type=setup,starting
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;From this custom endpoint&lt;BR /&gt;
&lt;A href="http://pastebin.com/2zMM8sak"&gt;http://pastebin.com/2zMM8sak&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 22 Jan 2017 22:20:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Why-is-setting-up-INFO-Logging-entries-from-custom-modular/m-p/247573#M47757</guid>
      <dc:creator>phoenixdigital</dc:creator>
      <dc:date>2017-01-22T22:20:07Z</dc:date>
    </item>
  </channel>
</rss>

