Package rocket.logging.rebind.findlogger

Examples of rocket.logging.rebind.findlogger.FindLoggerTemplatedFile$Logger


    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);
View Full Code Here

TOP

Related Classes of rocket.logging.rebind.findlogger.FindLoggerTemplatedFile$Logger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.