Examples of DOMConfigurator


Examples of org.apache.log4j.extras.DOMConfigurator

      }
      InputStream is = TimeBasedRollingTest.class.getResourceAsStream(resourceName);
      if (is == null) {
          throw new FileNotFoundException("Could not find resource " + resourceName);
      }
      DOMConfigurator configurator = new DOMConfigurator();
      configurator.doConfigure(is, LogManager.getLoggerRepository());
  }
View Full Code Here

Examples of org.apache.log4j.extras.DOMConfigurator

      }
      InputStream is = TimeBasedRollingTest.class.getResourceAsStream(resourceName);
      if (is == null) {
          throw new FileNotFoundException("Could not find resource " + resourceName);
      }
      DOMConfigurator configurator = new DOMConfigurator();
      configurator.doConfigure(is, LogManager.getLoggerRepository());
  }
View Full Code Here

Examples of org.apache.log4j.extras.DOMConfigurator

      }
      InputStream is = TimeBasedRollingTest.class.getResourceAsStream(resourceName);
      if (is == null) {
          throw new FileNotFoundException("Could not find resource " + resourceName);
      }
      DOMConfigurator configurator = new DOMConfigurator();
      configurator.doConfigure(is, LogManager.getLoggerRepository());
  }
View Full Code Here

Examples of org.apache.log4j.extras.DOMConfigurator

      }
      InputStream is = TimeBasedRollingTest.class.getResourceAsStream(resourceName);
      if (is == null) {
          throw new FileNotFoundException("Could not find resource " + resourceName);
      }
      DOMConfigurator configurator = new DOMConfigurator();
      configurator.doConfigure(is, LogManager.getLoggerRepository());
  }
View Full Code Here

Examples of org.apache.log4j.xml.DOMConfigurator

        } catch (IOException e) {
            log.warn("Could not determine content type from URL; ignoring", e);
        }
        if (contentType != null) {
            if (contentType.toLowerCase().endsWith("/xml")) {
                return new DOMConfigurator();
            }
        }

        // Check thr file name
        String filename = url.getFile().toLowerCase();
        if (filename.endsWith(".xml")) {
            return new DOMConfigurator();
        } else if (filename.endsWith(".properties")) {
            return new PropertyConfigurator();
        }

        // Check for <?xml in content
        if (connection != null) {
            try {
                BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                try {
                    String head = reader.readLine();
                    if (head.startsWith("<?xml")) {
                        return new DOMConfigurator();
                    }
                } finally {
                    reader.close();
                }
            } catch (IOException e) {
View Full Code Here

Examples of org.apache.log4j.xml.DOMConfigurator

        } catch (IOException e) {
            log.warn("Could not determine content type from URL; ignoring", e);
        }
        if (contentType != null) {
            if (contentType.toLowerCase().endsWith("/xml")) {
                return new DOMConfigurator();
            }
        }

        // Check thr file name
        String filename = url.getFile().toLowerCase();
        if (filename.endsWith(".xml")) {
            return new DOMConfigurator();
        } else if (filename.endsWith(".properties")) {
            return new PropertyConfigurator();
        }

        // Check for <?xml in content
        if (connection != null) {
            try {
                BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                try {
                    String head = reader.readLine();
                    if (head.startsWith("<?xml")) {
                        return new DOMConfigurator();
                    }
                } finally {
                    reader.close();
                }
            } catch (IOException e) {
View Full Code Here

Examples of org.apache.log4j.xml.DOMConfigurator

        } catch (IOException e) {
            log.warn("Could not determine content type from URL; ignoring", e);
        }
        if (contentType != null) {
            if (contentType.toLowerCase().endsWith("/xml")) {
                return new DOMConfigurator();
            }
        }

        // Check thr file name
        String filename = url.getFile().toLowerCase();
        if (filename.endsWith(".xml")) {
            return new DOMConfigurator();
        } else if (filename.endsWith(".properties")) {
            return new PropertyConfigurator();
        }

        // Check for <?xml in content
        if (connection != null) {
            try {
                BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                try {
                    String head = reader.readLine();
                    if (head.startsWith("<?xml")) {
                        return new DOMConfigurator();
                    }
                } finally {
                    reader.close();
                }
            } catch (IOException e) {
View Full Code Here

Examples of org.apache.log4j.xml.DOMConfigurator

        } catch (IOException e) {
            log.warn("Could not determine content type from URL; ignoring", e);
        }
        if (contentType != null) {
            if (contentType.toLowerCase().endsWith("/xml")) {
                return new DOMConfigurator();
            }
        }

        // Check thr file name
        String filename = url.getFile().toLowerCase();
        if (filename.endsWith(".xml")) {
            return new DOMConfigurator();
        } else if (filename.endsWith(".properties")) {
            return new PropertyConfigurator();
        }

        // Check for <?xml in content
        if (connection != null) {
            try {
                BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                try {
                    String head = reader.readLine();
                    if (head.startsWith("<?xml")) {
                        return new DOMConfigurator();
                    }
                } finally {
                    reader.close();
                }
            } catch (IOException e) {
View Full Code Here

Examples of org.apache.log4j.xml.DOMConfigurator

        } catch (IOException e) {
            log.warn("Could not determine content type from URL; ignoring", e);
        }
        if (contentType != null) {
            if (contentType.toLowerCase().endsWith("/xml")) {
                return new DOMConfigurator();
            }
        }

        // Check thr file name
        String filename = url.getFile().toLowerCase();
        if (filename.endsWith(".xml")) {
            return new DOMConfigurator();
        } else if (filename.endsWith(".properties")) {
            return new PropertyConfigurator();
        }

        // Check for <?xml in content
        if (connection != null) {
            try {
                BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                try {
                    String head = reader.readLine();
                    if (head.startsWith("<?xml")) {
                        return new DOMConfigurator();
                    }
                } finally {
                    reader.close();
                }
            } catch (IOException e) {
View Full Code Here

Examples of org.apache.log4j.xml.DOMConfigurator

      else
      {
        //slightly ugly hack: record a good default configuration as a String in this class, and load that
        //emulating DOMConfigurator.configure(Reader)
        //see http://svn.apache.org/viewvc/logging/log4j/branches/v1_2-branch/src/java/org/apache/log4j/xml/DOMConfigurator.java?revision=311462&view=markup
        new DOMConfigurator().doConfigure(new StringReader(DEFAULT_LOG4J_CONFIG), org.apache.log4j.LogManager.getLoggerRepository());
      }
    }
    //setup the logger for this class
    logger = Logger.getLogger(ApplicationSetup.class);
    //setup default filename
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.