• 
      

    Add a logging config option to blacklist specific loggers from logging.

    Review Request #8994 — Created June 4, 2017 and submitted

    Information

    Djblets
    release-0.10.x
    e2ed5f0...

    Reviewers

    This adds a new LOGGING_BLACKLIST setting that can be set to a list of
    logger names that you want to prevent from logging to any handlers. Any
    loggers listed, or any descendants of those loggers, will be ignored.

    The blacklist defaults to the django.db.backends logger, which will log
    a large amount of SQL query output. Projects or users can override the
    list to include other logger names.

    Tested that SQL output was no longer being logged, but everything else
    was. Tested adding custom loggers as well.

    Description From Last Updated

    This could be one statement: return all(not log_filter.filter(record) for log_filter in self._filters)

    daviddavid
    brennie
    1. Ship It!
    2. 
        
    david
    1. 
        
    2. djblets/log/__init__.py (Diff revision 1)
       
       
       
       
       
       
      Show all issues

      This could be one statement:

      return all(not log_filter.filter(record)
                 for log_filter in self._filters)
      
    3. 
        
    chipx86
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-0.10.x (7d30801)