Friday, September 4, 2020

Django - Duplicate Unformatted Logs

Recently I worked on a bug that was causing duplicate unformatted log messages to appear in a Django app's logs. I made a repository that demonstrates the issue: https://github.com/pawl/django_duplicate_unformatted_logs_example

The problem was caused by an accidental call to logging.info (without using logging.getLogger to get a specific logger) while the root logger isn't already configured.

The solution ended up being to get rid of the accidental calls to logging.info and configuring the root logger to prevent it from accidentally happening again. I go into more details in that repo.

1 comment:

  1. Thank you for sharing the article. The data that you provided in the blog is informative and effective.

    Tableau Training in Hyderabad

    ReplyDelete