I am setting up a user interface and want to allow the user to specify what kind of logging is required. For this I want to use something like this:
logging.basicConfig(level=logging.INFO)
where the INFO setting can be specified.
For logging there are the following options: DEBUG, INFO, WARNING, ERROR, CRITICAL and I will have it stored in a string. How can I substitute the string appropriately into the code above?