Using a variable while calling logger.setLevel

You should also be able to do this:

Log = logging.getLogger('myLogger')
level = logging.getLevelName('INFO')
Log.setLevel(level)

The logging.getLevelName(lvl) function works both ways. I use it, it works (you should check your python implementation though).

This saves you the trouble to maintain your own dictionary, and reduces the possibility of typo errors.

Leave a Comment

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş