Custom Python logger for Splunk Modular Input
Use the following to use this logger:
log = mylogger.Logger(level='INFO')
# If you'd like to set/change Splunk Modular Input Name in log message and/or to dynamically change logging level:
for input_name, input_item in inputs.inputs.iteritems():
log.source = input_name
log.setLevel(input_item['log_level'])