How to properly configure Python logging using dictConfig with JSON? or Best practices for setting up

14 Replies, 952 Views

Dude, python logging dictconfig json is *so* much cleaner than the old .ini files, but yeah, it’s easy to overcomplicate.

For handlers, just stick to one or two—like a console handler and a file handler. No need to go wild.

Also, `"disable_existing_loggers": False` is a lifesaver if you’re using third-party libs that log stuff.

If you’re lazy (like me), just copy-paste from this guide: [Real Python’s Logging Guide](https://realpython.com/python-logging/).

Messages In This Thread



Users browsing this thread: 1 Guest(s)