Migrating from log4j to log4j2. Previously, the following function is called, after creating the Logger object.
public static void getLog4JSettingsFromString(String configString) throws IOException {
Properties log4j = new java.util.Properties();
log4j.load(new ByteArrayInputStream(configString.getBytes()));
PropertyConfigurator.configure(log4j);
}