9ba3722 fix triplicated log messages

Authored and Committed by kparal 3 years ago
    fix triplicated log messages
    
    Before this patch, all messages logged with `logging.getLogger('foo')` were
    printed once, but all messages logged with `app.logger` were printed triplicated.
    The reason was that
    a) the `app.logger` is initialized with stream logging enabled by default, so
    we were adding it a second time
    b) everything sent to the `app.logger` goes also through the `root_logger` which
    was also configured with the same handlers, which resulted in one extra message
    
    The fix is to clean all handlers on program start, so that default handlers are
    removed. And then only add handlers to the `root_logger` and not also to the
    `app.logger`, because the message passes both when `app.logger` is invoked.
    
    Merges: https://pagure.io/fedora-qa/blockerbugs/pull-request/133
    
        
file modified
+2 -4