Skip to content

Latest commit

 

History

History
11 lines (10 loc) · 399 Bytes

README.md

File metadata and controls

11 lines (10 loc) · 399 Bytes

splunk-logger

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'])