Relative Content

Tag Archive for pythonpython-logging

Why is my log file empty in my python script?

I am trying to output the errors, if there are any in the code, and also the results of the stored procedure in my log file. The log file is created but it is empty. I have other logging in my code that logs errors but nothing is showing up. Here is my code:

Is it possible to promote the log traces issued from a child logger under a configured root logger?

We have a few specific python modules which have most of their log traces of the form logging.debug. The owner of that source wishes the log traces to be debug, another team wishes them to be info. The root logger the second team uses sets logging.INFO as their application’s logging level since there are a lot of other source modules which would flood the app’s logs with debug traces if the root logger were set to that level.