def METHOD_NAME(logging_config, core, debug):
    # If --debug or DEBUG=1, apply DEBUG to all core loggers
    if debug in (True, '__debug__'):
        debug = core
    if hasattr(debug, 'split'):
        debug = filter(None, debug.split(','))
    # Now apply debug level.
    if debug:
        for loggername in debug:
            logger = logging_config['loggers'].setdefault(loggername, {})
            logger['level'] = 'DEBUG'