Examples of LoggerFactory


Examples of org.objectweb.util.monolog.api.LoggerFactory

*
* @author Sebastien Chassande-Barrioz
*/
public class Additivity {
  public static void main(String[] args) {
    LoggerFactory lf;
    switch(args.length) {
    case 0:
      //Let monolog find the monolog.properties in the classpath or use
      // the default configuration
      lf = Monolog.initialize();
      break;
    case 1:
      // A monolog configuration file has been specified, then use it
      lf = Monolog.getMonologFactory(args[0]);
      break;
    default:
      System.out.println("Syntax error!\nUsage: java Additivity [<monolog file name>]");
      return;
    }
    Logger l = lf.getLogger("monolog.examples.additivity.foo.bar");
    l.log(BasicLevel.DEBUG, "This is an additivity example");
  }
View Full Code Here

Examples of org.objectweb.util.monolog.api.LoggerFactory

/**
* @author S.Chassande-Barrioz
*/
public class RollingFile {
    public static void main(String[] args) {
      LoggerFactory lf;
      switch(args.length) {
      case 0:
        //Let monolog find the monolog.properties in the classpath or use
        // the default configuration
        lf = Monolog.initialize();
View Full Code Here

Examples of org.objectweb.util.monolog.wrapper.javaLog.LoggerFactory

        prop.put(LoggerFactory.JAVALOG_CONFIGURATION_CLASS, configParam);
    }
    System.out.println("Test the configurability with in " + configMode
      + " mode");

    LoggerFactory mlf = new LoggerFactory();
    try {
      mlf.configure(prop);
    }
    catch (Exception e) {
      System.out.println("Impossible to configure in " + configMode
        + "mode");
      e.printStackTrace();
      System.exit(12);
    }

    Logger l = mlf.getLogger("org.objectweb.monolog.javalog.test.toto");
    l.log(BasicLevel.INFO, "test PASSED");
  }
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.