Moved the global log level setting to the top of the file.