Package org.jclouds.logging.log4j.config

Examples of org.jclouds.logging.log4j.config.Log4JLoggingModule


      String identity = checkNotNull(System.getProperty("jclouds.test.identity"), "jclouds.test.identity");
      String credential = checkNotNull(System.getProperty("jclouds.test.credential"), "jclouds.test.credential");

      this.context = new RestContextFactory().createContext("sdn", identity, credential, ImmutableSet
               .<Module> of(new Log4JLoggingModule()));
      this.connection = context.getApi();
   }
View Full Code Here


      try {
         // Track http commands
         final List<HttpCommand> commandsInvoked = Lists.newArrayList();
         context = createView(
               setupProperties(),
               ImmutableSet.<Module> of(new Log4JLoggingModule(),
                     TrackingJavaUrlHttpCommandExecutorService.newTrackingModule(commandsInvoked)));
        
         Template template = context.getComputeService().templateBuilder().imageId(defaultImageId)
                  .build();
         assertEquals(template.getImage(), defaultTemplate.getImage());
View Full Code Here

      nodes.append("      credential_url: file://").append(System.getProperty("user.home")).append("/.ssh/id_rsa")
               .append("\n");

      contextProperties.setProperty("byon.nodes", nodes.toString());
      context = ContextBuilder.newBuilder(new BYONApiMetadata()).overrides(contextProperties).modules(
               ImmutableSet.<Module> of(new SshjSshClientModule(), new Log4JLoggingModule())).build(
               ComputeServiceContext.class);
   }
View Full Code Here

   @BeforeGroups(groups = { "live" })
   public void setupClient() {
      setupCredentials();
      Properties overrides = setupProperties();
      context = new RestContextFactory().createContext(provider, ImmutableSet.<Module> of(new Log4JLoggingModule()),
            overrides);
      this.client = context.getApi();
   }
View Full Code Here

            properties.setProperty(
                  S3Constants.PROPERTY_POOL_MAX_CONNECTIONS, config
                        .getMaxConnections()
                        + "");
         // TODO proxy host/port
         Module loggingModule = org.infinispan.util.logging.LogFactory.IS_LOG4J_AVAILABLE ? new Log4JLoggingModule()
               : new JDKLoggingModule();
         this.context = S3ContextFactory.createS3Context(properties,
                                                         new HttpNioConnectionPoolClientModule(), loggingModule);
         this.s3Service = context.getConnection();
         if (this.s3Service == null) {
View Full Code Here

  public static ComputeServiceContext build(final ComputeServiceContextFactory factory, final ClusterSpec spec) throws IOException {
    Configuration jcloudsConfig =
      spec.getConfigurationForKeysWithPrefix("jclouds");
    Set<AbstractModule> wiring = ImmutableSet.of(new JschSshClientModule(),
      new Log4JLoggingModule(), new BindLoginCredentialsPatchForEC2());
    if (spec.getProvider().equals("ec2")){
      LOG.warn("please use provider \"aws-ec2\" instead of \"ec2\"");
      spec.setProvider("aws-ec2");
    }
    if (spec.getProvider().equals("cloudservers")){
View Full Code Here

    overrides.put(ComputeServiceProperties.POLL_INITIAL_PERIOD, String.valueOf(60L * 1000L));
    overrides.put(ComputeServiceProperties.POLL_MAX_PERIOD, String.valueOf(600L * 1000L));
    overrides.put(Constants.PROPERTY_MAX_RETRIES, String.valueOf(60));
    mComputeServiceContext = ContextBuilder.newBuilder("aws-ec2")
        .credentials(apiKey, accessKey)
        .modules(ImmutableSet.of(new Log4JLoggingModule()))
        .overrides(overrides)
        .buildView(ComputeServiceContext.class);
    mComputeService = mComputeServiceContext.getComputeService();
  }
View Full Code Here

      options.authorizePublicKey(keyPair.get("public")).as(AWSEC2TemplateOptions.class);

      ComputeServiceContext noSshContext = null;
      try {
         noSshContext = createView(setupProperties(), ImmutableSet.<Module> of(new Log4JLoggingModule()));

         Set<? extends NodeMetadata> nodes = noSshContext.getComputeService().createNodesInGroup(group, 1, options);

         NodeMetadata first = get(nodes, 0);
         assert first.getCredentials() != null : first;
View Full Code Here

         final List<HttpCommand> commandsInvoked = Lists.newArrayList();
        
         context = createView(
               overrides,
               ImmutableSet.<Module> of(new Log4JLoggingModule(),
                     TrackingJavaUrlHttpCommandExecutorService.newTrackingModule(commandsInvoked)));

         assert context.getComputeService().listAssignableLocations().size() < this.view.getComputeService()
               .listAssignableLocations().size();
View Full Code Here

      nodes.append("      credential_url: file://").append(System.getProperty("user.home")).append("/.ssh/id_rsa")
               .append("\n");

      contextProperties.setProperty("byon.nodes", nodes.toString());
      context = ContextBuilder.newBuilder(new BYONApiMetadata()).overrides(contextProperties).modules(
               ImmutableSet.<Module> of(new SshjSshClientModule(), new Log4JLoggingModule())).build(
               ComputeServiceContext.class);
   }
View Full Code Here

TOP

Related Classes of org.jclouds.logging.log4j.config.Log4JLoggingModule

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.