Package org.jclouds.logging.log4j.config

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


            // 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

                if (!Strings.isNullOrEmpty(endpoint)) {
                    builder = builder.endpoint(endpoint);
                }

                builder = builder.name(id).modules(ImmutableSet.<Module>of(new Log4JLoggingModule(), new SshjSshClientModule(), new ManagementLifecycle(BaseManagementContext.INSTANCE)));

                if (credentialStore != null) {
                    builder = builder.modules(ImmutableSet.<Module>of(credentialStore));
                }
View Full Code Here

                if (!Strings.isNullOrEmpty(endpoint)) {
                    builder = builder.endpoint(endpoint);
                }
                context = builder.name(id).credentials(identity, credential)
                        .modules(ImmutableSet.<Module>of(new Log4JLoggingModule(), new ManagementLifecycle(BaseManagementContext.INSTANCE)))
                        .overrides(props)
                        .build(BlobStoreContext.class);

                BlobStore blobStore = context.getBlobStore();
                newRegistration = bundleContext.registerService(
View Full Code Here

            // 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

      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

      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

  public static ComputeServiceContext build(ClusterSpec spec) throws IOException {
    Configuration jcloudsConfig =
      spec.getConfigurationForKeysWithPrefix("jclouds");
    Set<AbstractModule> wiring = ImmutableSet.of(new JschSshClientModule(),
      new Log4JLoggingModule());

    return new ComputeServiceContextFactory().createContext(spec.getProvider(),
      spec.getIdentity(), spec.getCredential(),
      wiring, ConfigurationConverter.getProperties(jcloudsConfig));
  }
View Full Code Here

*/
public class ComputeServiceContextBuilder {

  public static ComputeServiceContext build(ClusterSpec spec) throws IOException {
    Set<AbstractModule> wiring = ImmutableSet.of(new JschSshClientModule(),
      new Log4JLoggingModule());

    ComputeServiceContext context = new ComputeServiceContextFactory()
      .createContext(spec.getProvider(), spec.getIdentity(), spec.getCredential(),
        wiring);

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.