Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

See current logging config in Python (Django)

I am setting up logging in Django, but for some reason I see no logs appear. Django uses Python's logging module (I use Python 2.7).

Is there a way I can see the currently configured logging setup, something like a logging.getConfigDict() or so?

like image 524
RemcoGerlich Avatar asked Nov 15 '25 00:11

RemcoGerlich


1 Answers

There's the logging_tree module for that:

pip install logging_tree

and then (via ./manage.py shell)

import logging_tree
logging_tree.printout()

More infos: http://rhodesmill.org/brandon/2012/logging_tree/

like image 188
damio Avatar answered Nov 17 '25 18:11

damio



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!