Package org.apache.log4j.joran

Examples of org.apache.log4j.joran.JoranConfigurator


       
        if(url!=null) {
            try {
              // we temporarily swap the TCCL so that plugins can find resources
              Thread.currentThread().setContextClassLoader(classLoader);
              JoranConfigurator jc = new JoranConfigurator();
              jc.doConfigure(url, LogManager.getLoggerRepository());
            }finally{
                // now switch it back...
                Thread.currentThread().setContextClassLoader(previousTCCL);
            }
        }
View Full Code Here


   @deprecated Replaced by the much more flexible {@link org.apache.log4j.joran.JoranConfigurator}.
   @since 0.8.3 */
public class DOMConfigurator extends JoranConfigurator {
 
  public static void configure(String file) {
    JoranConfigurator joran = new JoranConfigurator();
    joran.doConfigure(file, LogManager.getLoggerRepository());
  }
View Full Code Here

    JoranConfigurator joran = new JoranConfigurator();
    joran.doConfigure(file, LogManager.getLoggerRepository());
  }

  public static void configure(URL url) {
    JoranConfigurator joran = new JoranConfigurator();
    joran.doConfigure(url, LogManager.getLoggerRepository());
  }
View Full Code Here

      Layout layout = new PatternLayout("%p [%t] %c (%F:%L) - %m%n");
      root.addAppender(new ConsoleAppender(layout, ConsoleAppender.SYSTEM_OUT));
    }
    else if(args.length == 1) {
      if(args[0].endsWith("xml")) {
        JoranConfigurator jc = new JoranConfigurator();
         jc.doConfigure(args[0], LogManager.getLoggerRepository());
      } else {
          PropertyConfigurator.configure(args[0]);
      }
    } else {
      usage("Incorrect number of parameters.");
View Full Code Here

    System.exit(1);
  }

  static
  void init(String configFile) {
    JoranConfigurator jc = new JoranConfigurator();
    jc.doConfigure(configFile, LogManager.getLoggerRepository());
  }
View Full Code Here

        if(url!=null) {
            logger.info("Using '" + url.toExternalForm()+ "' for auto-configuration");
            try {
              // we temporarily swap the TCCL so that plugins can find resources
              Thread.currentThread().setContextClassLoader(classLoader);
              JoranConfigurator jc = new JoranConfigurator();
              jc.doConfigure(url, LogManager.getLoggerRepository());
            }finally{
                // now switch it back...
                Thread.currentThread().setContextClassLoader(previousTCCL);
            }
        }else {
View Full Code Here

   
   
    String configFile = args[4];

    if(configFile.endsWith(".xml")) {
      JoranConfigurator jc = new JoranConfigurator();
      LoggerRepository repository = LogManager.getLoggerRepository();
      jc.doConfigure(configFile, repository);
    } else {
      PropertyConfigurator.configure(configFile);
    }
   
    new JMSSink(tcfBindingName, topicBindingName, username, password);
View Full Code Here

      "Usage: java " + DOMTest.class.getName() + " configFile");
    System.exit(1);
  }

  static void init(String configFile) {
    JoranConfigurator jc = new JoranConfigurator();
    jc.doConfigure(configFile, LogManager.getLoggerRepository());
  }
View Full Code Here

   @author Anders Kristensen
   @deprecated Replaced by the much more flexible {@link org.apache.log4j.joran.JoranConfigurator}.
   @since 0.8.3 */
public class DOMConfigurator extends JoranConfigurator {
  public static void configure(String file) {
    JoranConfigurator joran = new JoranConfigurator();
    joran.doConfigure(file, LogManager.getLoggerRepository());
  }
View Full Code Here

    JoranConfigurator joran = new JoranConfigurator();
    joran.doConfigure(file, LogManager.getLoggerRepository());
  }

  public static void configure(URL url) {
    JoranConfigurator joran = new JoranConfigurator();
    joran.doConfigure(url, LogManager.getLoggerRepository());
  }
View Full Code Here

TOP

Related Classes of org.apache.log4j.joran.JoranConfigurator

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.