Pass the numeric level to logging.getLevelName()
:
>>> import logging
>>> logging.getLevelName(10)
'DEBUG'
Does what it says on the tin:
Returns the textual representation of logging level lvl.
For your code that'd be:
print("Effective logging level is {}".format(
logging.getLevelName(logger.getEffectiveLevel())))