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

EventWriter should be compatible with logging

Open Jaykul opened this issue 12 years ago • 1 comments

That is, it should be more similar to the logging class.

At a minimum, the log method of EventWriter should take an integer LoggingLevel rather than a string as it's first argument.

There's really no reason good enough to make this incompatible. It's almost this easy, you'd just have to use stdout and stderr (or set the log file to output in splunk's log folder), and you'd be 90% done ...

It would make life so much easier (particularly when bringing existing code) if a modular input could just set their logger to the writer that gets passed to them in order to switch things from python logging to splunk logging.

Jaykul avatar May 14 '14 16:05 Jaykul

That's a good change to make. I've filed a bug for it internally and we'll try to get it out with the next release.

madhadron avatar May 14 '14 16:05 madhadron