Package org.jclouds.logging.log4j.config

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


            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.createContext(config.getAwsAccessKey(),config.getAwsSecretKey()).withModules(new HttpNioConnectionPoolClientModule(), loggingModule).build();
         this.s3Service = context.getConnection();
         if (this.s3Service == null) {
            throw new S3ConnectionException("Could not connect");
View Full Code Here


         if (constructInternalBlobstores) {
            // add an executor as a constructor param to EnterpriseConfigurationModule, pass
            // property overrides instead of Properties()
            ctx = new BlobStoreContextFactory().createContext(cfg.getCloudService(), cfg
                     .getIdentity(), cfg.getPassword(), ImmutableSet.of(
                     new EnterpriseConfigurationModule(), new Log4JLoggingModule()),
                     new Properties());
            blobStore = ctx.getBlobStore();
            asyncBlobStore = ctx.getAsyncBlobStore();
         }
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

      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

         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

      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

    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

            // This may run in or inside OSGi, so we choose explicitly set a credential store which
            // should be compatible with both.
            ContextBuilder builder = ContextBuilder
                     .newBuilder(providerOrApiValue)
                     .credentials(identityValue, credentialValue)
                     .modules(ImmutableSet.<Module> of(new SshjSshClientModule(), new Log4JLoggingModule(),
                              new PropertiesCredentialStore()));
            if (!Strings.isNullOrEmpty(endpointValue)) {
               builder = builder.endpoint(endpointValue);
            }
            computeService = builder.build(ComputeServiceContext.class).getComputeService();
View Full Code Here

      }
      if (blobStore == null && canCreateService) {
         try {
            ContextBuilder builder = ContextBuilder.newBuilder(providerOrApiValue)
                     .credentials(identityValue, credentialValue)
                     .modules(ImmutableSet.<Module> of(new Log4JLoggingModule()));
            if (!Strings.isNullOrEmpty(endpointValue)) {
               builder = builder.endpoint(endpointValue);
            }
            BlobStoreContext context = builder.build(BlobStoreContext.class);
            blobStore = context.getBlobStore();
View Full Code Here

    ApiMetadata selectedApi = selectedCloud.getApi();
    if (selectedProvider != null && selectedProvider != JClouds.EMPTY_PROVIDER) {
      context = ContextBuilder.newBuilder(selectedProvider)
                    .credentials(selectedCloud.getIdentity(), selectedCloud.getCredential())
                    .overrides(overrides)
                    .modules(ImmutableSet.<Module> of(new Log4JLoggingModule(),
                                                      new SshjSshClientModule()))
                    .buildView(ComputeServiceContext.class);
    } else if (selectedApi != null && selectedApi != JClouds.EMPTY_API) {
      context = ContextBuilder.newBuilder(selectedApi)
                      .credentials(selectedCloud.getIdentity(), selectedCloud.getCredential())
                      .overrides(overrides)
                      .modules(ImmutableSet.<Module> of(new Log4JLoggingModule(),
                                                        new SshjSshClientModule()))
                      .buildView(ComputeServiceContext.class);
    } else {
      return new Image[0];
    }
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.