protected void setLogLevel(String loggerName, Level newLevel) {

		logSettingsChanged = true;

		Configurator.setLevel(loggerName, newLevel);

		LoggerContext loggerContext = (LoggerContext) LogManager.getContext(false);
		Configuration configuration = loggerContext.getConfiguration();
		LoggerConfig rootLoggerConfiguration = configuration.getLoggers().get("");

		AppenderRef consoleAppender = getConsoleAppender(configuration, rootLoggerConfiguration);
		Level currentLevel = consoleAppender.getLevel();
		if (currentLevel.compareTo(newLevel) > 0) {
			// the requested level is lower than the current level, so the messages will be shown
			return;
		}

		// Note: we have to tell the console appender to change its level as well.  Otherwise, users
		// may not see their messages in the console. It is set to DEBUG by default.
		String consoleAppenderName = "console";
		rootLoggerConfiguration.removeAppender(consoleAppenderName);
		Appender appender = configuration.getAppender(consoleAppenderName);
		rootLoggerConfiguration.addAppender(appender, newLevel, null);
		loggerContext.updateLoggers();
	}
A convenience method to change the log level of the given logger name. The logger name is
typically the class name that contains specialized logging. You may also pass a package name
to get logging for all classes in that package. See
{@link Configurator#setLevel(String, Level)}
<P>
The console appender's log level will be changed if needed to ensure that messages for the
given log level are displayed.
<P>
The log system will be reset to the default settings when the test is finished.

@param loggerName the logger name
@param newLevel the new log level to use
Ghidra/Framework/Generic/src/main/java/generic/test/AbstractGenericTest.java