if parent.__class__.__name__ == 'RootLogger':
    for h in logger.__dict__['handlers']:
        if h.__class__.__name__ == 'TimedRotatingFileHandler':
            pass
How to get file the Python logging module is currently logging to?