Java Code Examples for org.mortbay.log.Log#isDebugEnabled()

The following examples show how to use org.mortbay.log.Log#isDebugEnabled() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JettyConfiguration.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
/**
 * Set up the classloader for the webapp, using the various parts of the Maven project
 *
 * @see org.mortbay.jetty.webapp.Configuration#configureClassLoader()
 */
public void configureClassLoader() throws Exception {
    if (classPathFiles != null) {
        Log.debug("Setting up classpath ...");

        //put the classes dir and all dependencies into the classpath
        for (File classPathFile : classPathFiles) {
            ((WebAppClassLoader) getWebAppContext().getClassLoader()).addClassPath(
                    classPathFile.getCanonicalPath());
        }

        if (Log.isDebugEnabled()) {
            Log.debug("Classpath = " + LazyList.array2List(
                    ((URLClassLoader) getWebAppContext().getClassLoader()).getURLs()));
        }
    } else {
        super.configureClassLoader();
    }
}
 
Example 2
Source File: JettyConfiguration.java    From pushfish-android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
/**
 * Set up the classloader for the webapp, using the various parts of the Maven project
 *
 * @see org.mortbay.jetty.webapp.Configuration#configureClassLoader()
 */
public void configureClassLoader() throws Exception {
    if (classPathFiles != null) {
        Log.debug("Setting up classpath ...");

        //put the classes dir and all dependencies into the classpath
        for (File classPathFile : classPathFiles) {
            ((WebAppClassLoader) getWebAppContext().getClassLoader()).addClassPath(
                    classPathFile.getCanonicalPath());
        }

        if (Log.isDebugEnabled()) {
            Log.debug("Classpath = " + LazyList.array2List(
                    ((URLClassLoader) getWebAppContext().getClassLoader()).getURLs()));
        }
    } else {
        super.configureClassLoader();
    }
}
 
Example 3
Source File: JettyConfiguration.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
/**
 * Set up the classloader for the webapp, using the various parts of the Maven project
 *
 * @see org.mortbay.jetty.webapp.Configuration#configureClassLoader()
 */
public void configureClassLoader() throws Exception {
    if (classPathFiles != null) {
        Log.debug("Setting up classpath ...");

        //put the classes dir and all dependencies into the classpath
        for (File classPathFile : classPathFiles) {
            ((WebAppClassLoader) getWebAppContext().getClassLoader()).addClassPath(
                    classPathFile.getCanonicalPath());
        }

        if (Log.isDebugEnabled()) {
            Log.debug("Classpath = " + LazyList.array2List(
                    ((URLClassLoader) getWebAppContext().getClassLoader()).getURLs()));
        }
    } else {
        super.configureClassLoader();
    }
}
 
Example 4
Source File: JettyConfiguration.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 6 votes vote down vote up
/**
 * Set up the classloader for the webapp, using the various parts of the Maven project
 *
 * @see org.mortbay.jetty.webapp.Configuration#configureClassLoader()
 */
public void configureClassLoader() throws Exception {
    if (classPathFiles != null) {
        Log.debug("Setting up classpath ...");

        //put the classes dir and all dependencies into the classpath
        for (File classPathFile : classPathFiles) {
            ((WebAppClassLoader) getWebAppContext().getClassLoader()).addClassPath(
                    classPathFile.getCanonicalPath());
        }

        if (Log.isDebugEnabled()) {
            Log.debug("Classpath = " + LazyList.array2List(
                    ((URLClassLoader) getWebAppContext().getClassLoader()).getURLs()));
        }
    } else {
        super.configureClassLoader();
    }
}
 
Example 5
Source File: FileUtil.java    From RDFS with Apache License 2.0 6 votes vote down vote up
/**
 * Change the permissions on a file / directory, recursively, if
 * needed.
 * @param filename name of the file whose permissions are to change
 * @param perm permission string
 * @param recursive true, if permissions should be changed recursively
 * @return the exit code from the command.
 * @throws IOException
 * @throws InterruptedException
 */
public static int chmod(String filename, String perm, boolean recursive)
                          throws IOException, InterruptedException {
  StringBuffer cmdBuf = new StringBuffer();
  cmdBuf.append("chmod ");
  if (recursive) {
    cmdBuf.append("-R ");
  }
  cmdBuf.append(perm).append(" ");
  cmdBuf.append(filename);
  String[] shellCmd = {"bash", "-c" ,cmdBuf.toString()};
  ShellCommandExecutor shExec = new ShellCommandExecutor(shellCmd);
  try {
    shExec.execute();
  }catch(IOException e) {
    if(Log.isDebugEnabled()) {
      Log.debug("Error while changing permission : " + filename 
          +" Exception: " + StringUtils.stringifyException(e));
    }
  }
  return shExec.getExitCode();
}