logging in continouous loop

Posted by Mikkel Jans on Stack Overflow See other posts from Stack Overflow or by Mikkel Jans
Published on 2011-06-28T12:06:40Z Indexed on 2011/06/28 16:22 UTC
Read the original article Hit count: 237

Filed under:
|

What would be a good way to create logs (with python logging module) inside a constant running loop, without producing a large amount of useless log-files? An example would be a loop that constant list a folder, and does some action when it sees a file of a specific type. I want to log that no files were found, or files were found but of a wrong type, without logging that same line constantly for each folder check, as it might run many times a second.

© Stack Overflow or respective owner

Related posts about python

Related posts about logging