splunk-sdk-python icon indicating copy to clipboard operation
splunk-sdk-python copied to clipboard

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

Open yalinglee opened this issue 4 years ago • 1 comments

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):

  • Version: 8.1.4
  • OS: Ubuntu 18.04.1
  • Deployment: search head and indexer clusters

SDK (please complete the following information):

  • Version: 1.6.15 and higher
  • Language Runtime Version: Python 3.7
  • OS: Ubuntu 18.04.1

yalinglee avatar Jan 12 '22 19:01 yalinglee

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

ashah-splunk avatar Jan 19 '22 11:01 ashah-splunk