Changing loglevel to int to be compatible with Python 3.3