org.codehaus.cargo.util.log.Logger.debug()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(13.4k)|赞(0)|评价(0)|浏览(201)

本文整理了Java中org.codehaus.cargo.util.log.Logger.debug()方法的一些代码示例,展示了Logger.debug()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.debug()方法的具体详情如下:
包路径:org.codehaus.cargo.util.log.Logger
类名称:Logger
方法名:debug

Logger.debug介绍

[英]Logger debug messages.
[中]记录器调试消息。

代码示例

代码示例来源:origin: codehaus-cargo/cargo

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public void setProperty(String name, String value)
  6. {
  7. if (value != null)
  8. {
  9. getLogger().debug("Setting property [" + name + "] = [" + value + "]",
  10. this.getClass().getName());
  11. this.properties.put(name, value);
  12. }
  13. else
  14. {
  15. getLogger().debug("Removing property [" + name + "]", this.getClass().getName());
  16. this.properties.remove(name);
  17. }
  18. }

代码示例来源:origin: codehaus-cargo/cargo

  1. /**
  2. * Add extra container classpath entries specified by the user.
  3. *
  4. * @param java the java command used to start/stop the container
  5. */
  6. protected void addExtraClasspath(JvmLauncher java)
  7. {
  8. for (String extraClasspathItem : extraClasspath)
  9. {
  10. java.addClasspathEntries(extraClasspathItem);
  11. getLogger().debug("Adding [" + extraClasspathItem + "] to execution classpath",
  12. this.getClass().getName());
  13. }
  14. }

代码示例来源:origin: codehaus-cargo/cargo

  1. /**
  2. * Parse properties and add any users to pending configuration. Users will be retrieved from
  3. * their property: {@link ServletPropertySet#USERS}
  4. */
  5. protected void addUsersFromProperties()
  6. {
  7. getLogger().debug("Searching properties for User definition",
  8. this.getClass().getName());
  9. String usersProperty = getPropertyValue(ServletPropertySet.USERS);
  10. if (usersProperty != null)
  11. {
  12. getLogger().debug("Found User definition: value [" + usersProperty + "]",
  13. this.getClass().getName());
  14. List<User> usersFromProp = User.parseUsers(usersProperty);
  15. getUsers().addAll(usersFromProp);
  16. }
  17. }

代码示例来源:origin: codehaus-cargo/cargo

  1. /**
  2. * Parse properties and add any Resources to pending configuration. Resources will be found if
  3. * their property name starts with: {@link ResourcePropertySet#RESOURCE}
  4. */
  5. protected void addResourcesFromProperties()
  6. {
  7. getLogger().debug("Searching properties for Resource definitions",
  8. this.getClass().getName());
  9. for (Map.Entry<String, String> property : getProperties().entrySet())
  10. {
  11. String propertyName = property.getKey();
  12. if (propertyName.startsWith(ResourcePropertySet.RESOURCE))
  13. {
  14. String resourceProperty = property.getValue();
  15. getLogger().debug("Found Resource definition: value [" + resourceProperty + "]",
  16. this.getClass().getName());
  17. Resource resource = new ResourceConverter().fromPropertyString(resourceProperty);
  18. getResources().add(resource);
  19. }
  20. }
  21. }

代码示例来源:origin: codehaus-cargo/cargo

  1. /**
  2. * Notify listeners that deployable is deployed/undeployed.
  3. * @param isDeployed True is deployable is deployed, false otherwise.
  4. */
  5. protected void notifyListeners(boolean isDeployed)
  6. {
  7. for (DeployableMonitorListener listener : listeners)
  8. {
  9. getLogger().debug("Notifying monitor listener [" + listener + "]",
  10. this.getClass().getName());
  11. if (isDeployed)
  12. {
  13. listener.deployed();
  14. }
  15. else
  16. {
  17. listener.undeployed();
  18. }
  19. }
  20. }

代码示例来源:origin: codehaus-cargo/cargo

  1. /**
  2. * Extract the context name from the WAR file name (without the file extension). For example if
  3. * the WAR is named <code>test.war</code> then the context name is <code>test</code>.
  4. */
  5. private void parseContext()
  6. {
  7. if (this.context == null)
  8. {
  9. String ctx = getFileHandler().getName(getFile());
  10. int warIndex = ctx.toLowerCase().lastIndexOf(".war");
  11. if (warIndex >= 0)
  12. {
  13. ctx = ctx.substring(0, warIndex);
  14. }
  15. getLogger().debug("Parsed web context = [" + ctx + "]", this.getClass().getName());
  16. setContext(ctx);
  17. }
  18. }

代码示例来源:origin: org.codehaus.cargo/cargo-core-container-tomcat

  1. /**
  2. * @return the list of applications available in Tomcat and their statuses.
  3. */
  4. public String list()
  5. {
  6. getLogger().debug("Getting the list of applications and their statuses",
  7. this.getClass().getName());
  8. try
  9. {
  10. return getTomcatManager().list();
  11. }
  12. catch (IOException|TomcatManagerException exception)
  13. {
  14. throw new ContainerException("Failed to get the list of applications", exception);
  15. }
  16. }

代码示例来源:origin: codehaus-cargo/cargo

  1. /**
  2. * @return the list of applications available in Tomcat and their statuses.
  3. */
  4. public String list()
  5. {
  6. getLogger().debug("Getting the list of applications and their statuses",
  7. this.getClass().getName());
  8. try
  9. {
  10. return getTomcatManager().list();
  11. }
  12. catch (IOException|TomcatManagerException exception)
  13. {
  14. throw new ContainerException("Failed to get the list of applications", exception);
  15. }
  16. }

代码示例来源:origin: codehaus-cargo/cargo

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public Deployer createDeployer(Container container)
  6. {
  7. Deployer deployer;
  8. DeployerType type = DeployerType.toType(container.getType());
  9. if (isDeployerRegistered(container.getId(), type))
  10. {
  11. getLogger().debug("Creating a default [" + type + "] deployer",
  12. this.getClass().getName());
  13. deployer = createDeployer(container, type);
  14. }
  15. else
  16. {
  17. throw new ContainerException("There's no registered deployer matching your "
  18. + "container's type of [" + container.getType().getType() + "]");
  19. }
  20. return deployer;
  21. }

代码示例来源:origin: org.codehaus.cargo/cargo-core-api-generic

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public Deployer createDeployer(Container container)
  6. {
  7. Deployer deployer;
  8. DeployerType type = DeployerType.toType(container.getType());
  9. if (isDeployerRegistered(container.getId(), type))
  10. {
  11. getLogger().debug("Creating a default [" + type + "] deployer",
  12. this.getClass().getName());
  13. deployer = createDeployer(container, type);
  14. }
  15. else
  16. {
  17. throw new ContainerException("There's no registered deployer matching your "
  18. + "container's type of [" + container.getType().getType() + "]");
  19. }
  20. return deployer;
  21. }

代码示例来源:origin: org.codehaus.cargo/cargo-core-container-geronimo

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. protected void doStart(JvmLauncher java) throws Exception
  6. {
  7. this.getLogger().debug("Starting container " + getName(), this.getClass().getName());
  8. java.setJarFile(new File(getConfiguration().getHome(), "bin/server.jar"));
  9. java.setSystemProperty("org.apache.geronimo.server.dir", getConfiguration().getHome());
  10. java.setSystemProperty("java.io.tmpdir",
  11. new File(getConfiguration().getHome(), "/var/temp").getPath());
  12. java.start();
  13. waitForCompletion(true);
  14. // deploy scheduled deployables
  15. GeronimoInstalledLocalDeployer deployer = new GeronimoInstalledLocalDeployer(this);
  16. for (Deployable deployable : this.getConfiguration().getDeployables())
  17. {
  18. deployer.redeploy(deployable);
  19. }
  20. }

代码示例来源:origin: codehaus-cargo/cargo

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. protected void doStart(JvmLauncher java) throws Exception
  6. {
  7. this.getLogger().debug("Starting container " + getName(), this.getClass().getName());
  8. java.setJarFile(new File(getConfiguration().getHome(), "bin/server.jar"));
  9. java.setSystemProperty("org.apache.geronimo.server.dir", getConfiguration().getHome());
  10. java.setSystemProperty("java.io.tmpdir",
  11. new File(getConfiguration().getHome(), "/var/temp").getPath());
  12. java.start();
  13. waitForCompletion(true);
  14. // deploy scheduled deployables
  15. GeronimoInstalledLocalDeployer deployer = new GeronimoInstalledLocalDeployer(this);
  16. for (Deployable deployable : this.getConfiguration().getDeployables())
  17. {
  18. deployer.redeploy(deployable);
  19. }
  20. }

代码示例来源:origin: org.codehaus.cargo/cargo-core-container-orion

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public void doStop(JvmLauncher java)
  6. {
  7. File adminClientJar = new File(getHome() + "/j2ee/home/admin_client.jar");
  8. java.setJarFile(adminClientJar);
  9. String shutdownURL = "deployer:oc4j:"
  10. + getConfiguration().getPropertyValue(GeneralPropertySet.HOSTNAME) + ":"
  11. + getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT);
  12. getLogger().debug("Shutdown URL [" + shutdownURL + "]", this.getClass().getName());
  13. java.addAppArguments(shutdownURL);
  14. java.addAppArguments("oc4jadmin");
  15. java.addAppArguments(getConfiguration().getPropertyValue(Oc4jPropertySet.ADMIN_PWD));
  16. java.addAppArguments("-shutdown");
  17. java.start();
  18. }

代码示例来源:origin: codehaus-cargo/cargo

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public void doStop(JvmLauncher java)
  6. {
  7. File adminClientJar = new File(getHome() + "/j2ee/home/admin_client.jar");
  8. java.setJarFile(adminClientJar);
  9. String shutdownURL = "deployer:oc4j:"
  10. + getConfiguration().getPropertyValue(GeneralPropertySet.HOSTNAME) + ":"
  11. + getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT);
  12. getLogger().debug("Shutdown URL [" + shutdownURL + "]", this.getClass().getName());
  13. java.addAppArguments(shutdownURL);
  14. java.addAppArguments("oc4jadmin");
  15. java.addAppArguments(getConfiguration().getPropertyValue(Oc4jPropertySet.ADMIN_PWD));
  16. java.addAppArguments("-shutdown");
  17. java.start();
  18. }

代码示例来源:origin: org.codehaus.cargo/cargo-core-container-geronimo

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. protected void doStop(JvmLauncher java) throws Exception
  6. {
  7. this.getLogger().debug("Stopping container " + getName(), this.getClass().getName());
  8. java.setJarFile(new File(getHome(), "bin/shutdown.jar"));
  9. java.setSystemProperty("org.apache.geronimo.server.dir", getConfiguration().getHome());
  10. java.setSystemProperty("java.io.tmpdir",
  11. new File(getConfiguration().getHome(), "/var/temp").getPath());
  12. java.addAppArguments("--user");
  13. java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.USERNAME));
  14. java.addAppArguments("--password");
  15. java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.PASSWORD));
  16. java.addAppArguments("--port");
  17. java.addAppArguments(getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT));
  18. java.start();
  19. }

代码示例来源:origin: codehaus-cargo/cargo

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. protected void doStop(JvmLauncher java) throws Exception
  6. {
  7. this.getLogger().debug("Stopping container " + getName(), this.getClass().getName());
  8. java.setJarFile(new File(getHome(), "bin/shutdown.jar"));
  9. java.setSystemProperty("org.apache.geronimo.server.dir", getConfiguration().getHome());
  10. java.setSystemProperty("java.io.tmpdir",
  11. new File(getConfiguration().getHome(), "/var/temp").getPath());
  12. java.addAppArguments("--user");
  13. java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.USERNAME));
  14. java.addAppArguments("--password");
  15. java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.PASSWORD));
  16. java.addAppArguments("--port");
  17. java.addAppArguments(getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT));
  18. java.start();
  19. }

代码示例来源:origin: org.codehaus.cargo/cargo-core-container-geronimo

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. protected void doStop(JvmLauncher java) throws Exception
  6. {
  7. this.getLogger().debug("Stopping container " + getName(), this.getClass().getName());
  8. java.setJarFile(new File(getConfiguration().getHome(), "bin/shutdown.jar"));
  9. java.setSystemProperty("org.apache.geronimo.server.dir", getConfiguration().getHome());
  10. java.setSystemProperty("java.io.tmpdir",
  11. new File(getConfiguration().getHome(), "/var/temp").getPath());
  12. java.addAppArguments("--user");
  13. java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.USERNAME));
  14. java.addAppArguments("--password");
  15. java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.PASSWORD));
  16. java.addAppArguments("--port");
  17. java.addAppArguments(getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT));
  18. java.start();
  19. }

代码示例来源:origin: codehaus-cargo/cargo

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. protected void doStop(JvmLauncher java) throws Exception
  6. {
  7. this.getLogger().debug("Stopping container " + getName(), this.getClass().getName());
  8. java.setJarFile(new File(getConfiguration().getHome(), "bin/shutdown.jar"));
  9. java.setSystemProperty("org.apache.geronimo.server.dir", getConfiguration().getHome());
  10. java.setSystemProperty("java.io.tmpdir",
  11. new File(getConfiguration().getHome(), "/var/temp").getPath());
  12. java.addAppArguments("--user");
  13. java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.USERNAME));
  14. java.addAppArguments("--password");
  15. java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.PASSWORD));
  16. java.addAppArguments("--port");
  17. java.addAppArguments(getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT));
  18. java.start();
  19. }

代码示例来源:origin: org.codehaus.cargo/cargo-core-container-geronimo

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. protected void doStop(JvmLauncher java) throws Exception
  6. {
  7. this.getLogger().debug("Stopping container " + getName(), this.getClass().getName());
  8. prepareJvmLauncher(java);
  9. java.setMainClass("org.apache.geronimo.cli.shutdown.ShutdownCLI");
  10. java.addAppArguments("--user");
  11. java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.USERNAME));
  12. java.addAppArguments("--password");
  13. java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.PASSWORD));
  14. java.addAppArguments("--port");
  15. java.addAppArguments(getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT));
  16. java.start();
  17. }

代码示例来源:origin: codehaus-cargo/cargo

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. protected void doStop(JvmLauncher java) throws Exception
  6. {
  7. this.getLogger().debug("Stopping container " + getName(), this.getClass().getName());
  8. prepareJvmLauncher(java);
  9. java.setMainClass("org.apache.geronimo.cli.shutdown.ShutdownCLI");
  10. java.addAppArguments("--user");
  11. java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.USERNAME));
  12. java.addAppArguments("--password");
  13. java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.PASSWORD));
  14. java.addAppArguments("--port");
  15. java.addAppArguments(getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT));
  16. java.start();
  17. }

相关文章