Moved in logenv.py, ready to refactor setting of log levels.