splunk / splunk-sdk-python

Splunk Software Development Kit for Python
http://dev.splunk.com
Apache License 2.0
687 stars 369 forks source link

SearchCommand.error_exit does not log to splunkd.log after version 1.6.15 #428

Closed yalinglee closed 1 year ago

yalinglee commented 2 years ago

Describe the bug When we upgraded splunk-sdk from 1.6.14 to 1.6.15, we noticed that error messages from SearchCommand.error_exit() were no longer written to splunkd.log by default. We were able to see the error messages again in splunkd.log by configuring the logging.conf file. Is this an intentional or incidental change? Is there any documentation about this change of logging behavior if this is by design?

To Reproduce Steps to reproduce the behavior:

  1. install a splunk-sdk version < 1.6.15
  2. in a custom search command python script, call error_exit(exception, error_message)
  3. run the script
  4. error message shows up in splunkd.log
  5. upgrade splunk-sdk to >= 1.6.15
  6. rerun the script
  7. no error message in splunkd.log

Expected behavior Expected error message written to splunkd.log

01-07-2022 09:42:02.413 -0800 ERROR ChunkedExternProcessor - stderr: Abnormal exit: xxxxxx. Error: some error message passed to SearchCommand.exit_error().

Splunk (please complete the following information):

SDK (please complete the following information):

ashah-splunk commented 2 years ago

@yalinglee we believe this is an incidental change and not intentional one