final NewMethod newMethod = method.copy(loggerFactory);
newMethod.setAbstract(false);
newMethod.setFinal(true);
newMethod.setNative(false);
final FindLoggerTemplatedFile template = new FindLoggerTemplatedFile();
newMethod.setBody(template);
final LoggingFactoryConfig config = this.getLoggingFactoryConfig();
context.debug("Config: " + config);
final Iterator<String> names = config.getNames();
while (names.hasNext()) {
final String name = names.next();
final String loggerTypeName = config.getTypeName(name);
final LoggingLevel loggingLevel = config.getLoggingLevel(name);
context.debug(name + "=" + loggerTypeName + " (" + loggingLevel + ")");
final Constructor loggingLevelLogger = this.getConstructorForLoggingLevel(loggingLevel);
final Constructor logger = this.getTargetLoggerConstructor(loggerTypeName);
template.register(name, loggingLevelLogger, logger);
}
// rename parameter to a known name which matches the variable named
// used in templates.
final NewMethodParameter parameter = (NewMethodParameter) newMethod.getParameters().get(0);