jruizgit / rules

Durable Rules Engine
MIT License
1.16k stars 206 forks source link

output logs via logging module, instead of print #317

Closed chance-nelson closed 4 years ago

chance-nelson commented 4 years ago

This is a resubmit of PR #315, removing all the spacing fixes. I will submit a separate PR, which brings the libpy.durable python module up to PEP8 compliance.

Problem

The Python module for the rules engine currently outputs all logs via stdout with the standard print function. It is typically a good idea to utilize the logging module, so that the deployed application can sort and hide printed information that won't be necessary to log. This also assists log analytics tools, such as splunk, in identifying errors.

Solution

I have replaced all print statements inside of the libpy/durable module with calls to the appropriate logging method.

jruizgit commented 4 years ago

Thanks a lot for your help on this.