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

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

本文整理了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

/**
 * {@inheritDoc}
 */
@Override
public void setProperty(String name, String value)
{
  if (value != null)
  {
    getLogger().debug("Setting property [" + name + "] = [" + value + "]",
      this.getClass().getName());
    this.properties.put(name, value);
  }
  else
  {
    getLogger().debug("Removing property [" + name + "]", this.getClass().getName());
    this.properties.remove(name);
  }
}

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

/**
 * Add extra container classpath entries specified by the user.
 * 
 * @param java the java command used to start/stop the container
 */
protected void addExtraClasspath(JvmLauncher java)
{
  for (String extraClasspathItem : extraClasspath)
  {
    java.addClasspathEntries(extraClasspathItem);
    getLogger().debug("Adding [" + extraClasspathItem + "] to execution classpath",
      this.getClass().getName());
  }
}

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

/**
 * Parse properties and add any users to pending configuration. Users will be retrieved from
 * their property: {@link ServletPropertySet#USERS}
 */
protected void addUsersFromProperties()
{
  getLogger().debug("Searching properties for User definition",
    this.getClass().getName());
  String usersProperty = getPropertyValue(ServletPropertySet.USERS);
  if (usersProperty != null)
  {
    getLogger().debug("Found User definition: value [" + usersProperty + "]",
        this.getClass().getName());
    List<User> usersFromProp = User.parseUsers(usersProperty);
    getUsers().addAll(usersFromProp);
  }
}

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

/**
 * Parse properties and add any Resources to pending configuration. Resources will be found if
 * their property name starts with: {@link ResourcePropertySet#RESOURCE}
 */
protected void addResourcesFromProperties()
{
  getLogger().debug("Searching properties for Resource definitions",
    this.getClass().getName());
  for (Map.Entry<String, String> property : getProperties().entrySet())
  {
    String propertyName = property.getKey();
    if (propertyName.startsWith(ResourcePropertySet.RESOURCE))
    {
      String resourceProperty = property.getValue();
      getLogger().debug("Found Resource definition: value [" + resourceProperty + "]",
        this.getClass().getName());
      Resource resource = new ResourceConverter().fromPropertyString(resourceProperty);
      getResources().add(resource);
    }
  }
}

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

/**
 * Notify listeners that deployable is deployed/undeployed.
 * @param isDeployed True is deployable is deployed, false otherwise.
 */
protected void notifyListeners(boolean isDeployed)
{
  for (DeployableMonitorListener listener : listeners)
  {
    getLogger().debug("Notifying monitor listener [" + listener + "]",
      this.getClass().getName());
    if (isDeployed)
    {
      listener.deployed();
    }
    else
    {
      listener.undeployed();
    }
  }
}

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

/**
 * Extract the context name from the WAR file name (without the file extension). For example if
 * the WAR is named <code>test.war</code> then the context name is <code>test</code>.
 */
private void parseContext()
{
  if (this.context == null)
  {
    String ctx = getFileHandler().getName(getFile());
    int warIndex = ctx.toLowerCase().lastIndexOf(".war");
    if (warIndex >= 0)
    {
      ctx = ctx.substring(0, warIndex);
    }
    getLogger().debug("Parsed web context = [" + ctx + "]", this.getClass().getName());
    setContext(ctx);
  }
}

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

/**
 * @return the list of applications available in Tomcat and their statuses.
 */
public String list()
{
  getLogger().debug("Getting the list of applications and their statuses",
    this.getClass().getName());
  try
  {
    return getTomcatManager().list();
  }
  catch (IOException|TomcatManagerException exception)
  {
    throw new ContainerException("Failed to get the list of applications", exception);
  }
}

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

/**
 * @return the list of applications available in Tomcat and their statuses.
 */
public String list()
{
  getLogger().debug("Getting the list of applications and their statuses",
    this.getClass().getName());
  try
  {
    return getTomcatManager().list();
  }
  catch (IOException|TomcatManagerException exception)
  {
    throw new ContainerException("Failed to get the list of applications", exception);
  }
}

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

/**
 * {@inheritDoc}
 */
@Override
public Deployer createDeployer(Container container)
{
  Deployer deployer;
  DeployerType type = DeployerType.toType(container.getType());
  if (isDeployerRegistered(container.getId(), type))
  {
    getLogger().debug("Creating a default [" + type + "] deployer",
      this.getClass().getName());
    deployer = createDeployer(container, type);
  }
  else
  {
    throw new ContainerException("There's no registered deployer matching your "
      + "container's type of [" + container.getType().getType() + "]");
  }
  return deployer;
}

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

/**
 * {@inheritDoc}
 */
@Override
public Deployer createDeployer(Container container)
{
  Deployer deployer;
  DeployerType type = DeployerType.toType(container.getType());
  if (isDeployerRegistered(container.getId(), type))
  {
    getLogger().debug("Creating a default [" + type + "] deployer",
      this.getClass().getName());
    deployer = createDeployer(container, type);
  }
  else
  {
    throw new ContainerException("There's no registered deployer matching your "
      + "container's type of [" + container.getType().getType() + "]");
  }
  return deployer;
}

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

/**
 * {@inheritDoc}
 */
@Override
protected void doStart(JvmLauncher java) throws Exception
{
  this.getLogger().debug("Starting container " + getName(), this.getClass().getName());
  java.setJarFile(new File(getConfiguration().getHome(), "bin/server.jar"));
  java.setSystemProperty("org.apache.geronimo.server.dir", getConfiguration().getHome());
  java.setSystemProperty("java.io.tmpdir",
    new File(getConfiguration().getHome(), "/var/temp").getPath());
  java.start();
  waitForCompletion(true);
  // deploy scheduled deployables
  GeronimoInstalledLocalDeployer deployer = new GeronimoInstalledLocalDeployer(this);
  for (Deployable deployable : this.getConfiguration().getDeployables())
  {
    deployer.redeploy(deployable);
  }
}

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

/**
 * {@inheritDoc}
 */
@Override
protected void doStart(JvmLauncher java) throws Exception
{
  this.getLogger().debug("Starting container " + getName(), this.getClass().getName());
  java.setJarFile(new File(getConfiguration().getHome(), "bin/server.jar"));
  java.setSystemProperty("org.apache.geronimo.server.dir", getConfiguration().getHome());
  java.setSystemProperty("java.io.tmpdir",
    new File(getConfiguration().getHome(), "/var/temp").getPath());
  java.start();
  waitForCompletion(true);
  // deploy scheduled deployables
  GeronimoInstalledLocalDeployer deployer = new GeronimoInstalledLocalDeployer(this);
  for (Deployable deployable : this.getConfiguration().getDeployables())
  {
    deployer.redeploy(deployable);
  }
}

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

/**
 * {@inheritDoc}
 */
@Override
public void doStop(JvmLauncher java)
{
  File adminClientJar = new File(getHome() + "/j2ee/home/admin_client.jar");
  java.setJarFile(adminClientJar);
  String shutdownURL = "deployer:oc4j:"
    + getConfiguration().getPropertyValue(GeneralPropertySet.HOSTNAME) + ":"
    + getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT);
  getLogger().debug("Shutdown URL [" + shutdownURL + "]", this.getClass().getName());
  java.addAppArguments(shutdownURL);
  java.addAppArguments("oc4jadmin");
  java.addAppArguments(getConfiguration().getPropertyValue(Oc4jPropertySet.ADMIN_PWD));
  java.addAppArguments("-shutdown");
  java.start();
}

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

/**
 * {@inheritDoc}
 */
@Override
public void doStop(JvmLauncher java)
{
  File adminClientJar = new File(getHome() + "/j2ee/home/admin_client.jar");
  java.setJarFile(adminClientJar);
  String shutdownURL = "deployer:oc4j:"
    + getConfiguration().getPropertyValue(GeneralPropertySet.HOSTNAME) + ":"
    + getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT);
  getLogger().debug("Shutdown URL [" + shutdownURL + "]", this.getClass().getName());
  java.addAppArguments(shutdownURL);
  java.addAppArguments("oc4jadmin");
  java.addAppArguments(getConfiguration().getPropertyValue(Oc4jPropertySet.ADMIN_PWD));
  java.addAppArguments("-shutdown");
  java.start();
}

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

/**
 * {@inheritDoc}
 */
@Override
protected void doStop(JvmLauncher java) throws Exception
{
  this.getLogger().debug("Stopping container " + getName(), this.getClass().getName());
  java.setJarFile(new File(getHome(), "bin/shutdown.jar"));
  java.setSystemProperty("org.apache.geronimo.server.dir", getConfiguration().getHome());
  java.setSystemProperty("java.io.tmpdir",
    new File(getConfiguration().getHome(), "/var/temp").getPath());
  java.addAppArguments("--user");
  java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.USERNAME));
  java.addAppArguments("--password");
  java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.PASSWORD));
  java.addAppArguments("--port");
  java.addAppArguments(getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT));
  java.start();
}

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

/**
 * {@inheritDoc}
 */
@Override
protected void doStop(JvmLauncher java) throws Exception
{
  this.getLogger().debug("Stopping container " + getName(), this.getClass().getName());
  java.setJarFile(new File(getHome(), "bin/shutdown.jar"));
  java.setSystemProperty("org.apache.geronimo.server.dir", getConfiguration().getHome());
  java.setSystemProperty("java.io.tmpdir",
    new File(getConfiguration().getHome(), "/var/temp").getPath());
  java.addAppArguments("--user");
  java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.USERNAME));
  java.addAppArguments("--password");
  java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.PASSWORD));
  java.addAppArguments("--port");
  java.addAppArguments(getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT));
  java.start();
}

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

/**
 * {@inheritDoc}
 */
@Override
protected void doStop(JvmLauncher java) throws Exception
{
  this.getLogger().debug("Stopping container " + getName(), this.getClass().getName());
  java.setJarFile(new File(getConfiguration().getHome(), "bin/shutdown.jar"));
  java.setSystemProperty("org.apache.geronimo.server.dir", getConfiguration().getHome());
  java.setSystemProperty("java.io.tmpdir",
    new File(getConfiguration().getHome(), "/var/temp").getPath());
  java.addAppArguments("--user");
  java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.USERNAME));
  java.addAppArguments("--password");
  java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.PASSWORD));
  java.addAppArguments("--port");
  java.addAppArguments(getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT));
  java.start();
}

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

/**
 * {@inheritDoc}
 */
@Override
protected void doStop(JvmLauncher java) throws Exception
{
  this.getLogger().debug("Stopping container " + getName(), this.getClass().getName());
  java.setJarFile(new File(getConfiguration().getHome(), "bin/shutdown.jar"));
  java.setSystemProperty("org.apache.geronimo.server.dir", getConfiguration().getHome());
  java.setSystemProperty("java.io.tmpdir",
    new File(getConfiguration().getHome(), "/var/temp").getPath());
  java.addAppArguments("--user");
  java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.USERNAME));
  java.addAppArguments("--password");
  java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.PASSWORD));
  java.addAppArguments("--port");
  java.addAppArguments(getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT));
  java.start();
}

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

/**
 * {@inheritDoc}
 */
@Override
protected void doStop(JvmLauncher java) throws Exception
{
  this.getLogger().debug("Stopping container " + getName(), this.getClass().getName());
  prepareJvmLauncher(java);
  java.setMainClass("org.apache.geronimo.cli.shutdown.ShutdownCLI");
  java.addAppArguments("--user");
  java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.USERNAME));
  java.addAppArguments("--password");
  java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.PASSWORD));
  java.addAppArguments("--port");
  java.addAppArguments(getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT));
  java.start();
}

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

/**
 * {@inheritDoc}
 */
@Override
protected void doStop(JvmLauncher java) throws Exception
{
  this.getLogger().debug("Stopping container " + getName(), this.getClass().getName());
  prepareJvmLauncher(java);
  java.setMainClass("org.apache.geronimo.cli.shutdown.ShutdownCLI");
  java.addAppArguments("--user");
  java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.USERNAME));
  java.addAppArguments("--password");
  java.addAppArguments(getConfiguration().getPropertyValue(RemotePropertySet.PASSWORD));
  java.addAppArguments("--port");
  java.addAppArguments(getConfiguration().getPropertyValue(GeneralPropertySet.RMI_PORT));
  java.start();
}

相关文章

微信公众号

最新文章

更多