Package org.objectweb.util.monolog.api

Examples of org.objectweb.util.monolog.api.TopicalLogger.addHandler()


    Handler h1 = mf.createHandler("h1", "console");
    h1.setAttribute(Handler.OUTPUT_ATTRIBUTE, "System.out");
    h1.setAttribute(Handler.LEVEL_ATTRIBUTE, "WARN");
    h1.setAttribute(Handler.PATTERN_ATTRIBUTE, "first handler: %m");
    h1.setAttribute("activation",mf);
    l.addHandler(h1);

    Handler h2 = mf.createHandler("h2", "console");
    h2.setAttribute(Handler.OUTPUT_ATTRIBUTE, "System.out");
    h2.setAttribute(Handler.PATTERN_ATTRIBUTE, "second handler: %m");
    h2.setAttribute("activation",mf);
View Full Code Here


    Handler h2 = mf.createHandler("h2", "console");
    h2.setAttribute(Handler.OUTPUT_ATTRIBUTE, "System.out");
    h2.setAttribute(Handler.PATTERN_ATTRIBUTE, "second handler: %m");
    h2.setAttribute("activation",mf);
    l.addHandler(h2);
    l = (TopicalLogger) mf.getLogger(
      "org.objectweb.util.monolog.TestHandlerLevel.testA.l1");
    l.log(BasicLevel.DEBUG, "(" + className + ") this message must be printed only one time");
  }
}
View Full Code Here

      hf.createHandler("myhandler_configurability", "file");
    hc.setAttribute(Handler.OUTPUT_ATTRIBUTE, "test.log");
    hc.setAttribute(Handler.PATTERN_ATTRIBUTE, "%m%n");
    hc.setAttribute("activation", lf);
    try {
      l.addHandler(hc);
    }
    catch (Exception e) {
      fail(e.getMessage());
    }
    l.setIntLevel(BasicLevel.DEBUG);
View Full Code Here

    hc2.setAttribute(Handler.OUTPUT_ATTRIBUTE, LOG_FILE_NAME + '2');
    hc2.setAttribute(Handler.PATTERN_ATTRIBUTE, LOG_PATTERN);
    hc2.setAttribute("activation", lf);
    try {
      l1.addHandler(hc1);
      l2.addHandler(hc2);
    }
    catch (Exception e) {
      fail(e.getMessage());
    }
    l2.setAdditivity(false);
View Full Code Here

    hc2.setAttribute(Handler.OUTPUT_ATTRIBUTE, LOG_FILE_NAME + '2');
    hc2.setAttribute(Handler.PATTERN_ATTRIBUTE, LOG_PATTERN);
    hc2.setAttribute("activation", lf);
    try {
      l1.addHandler(hc1);
      l2.addHandler(hc2);
    }
    catch (Exception e) {
      fail(e.getMessage());
    }
    l2.setAdditivity(false);
View Full Code Here

      l.addTopic("fr.inria.sardes4");
      l.addTopic("fr.inrialpes.sardes4");

      //logger.org.foo.bar5.handler.0 Handler_file
      l = (TopicalLogger) lf.getLogger("org.foo.bar5");
      l.addHandler( hf.getHandler("Handler_file"));

      //logger.org.foo.bar6.handler.0 Handler_file
      l = (TopicalLogger) lf.getLogger("org.foo.bar6");
      l.addHandler( hf.getHandler("Handler_file"));
      l.addHandler( hf.getHandler("Handler.rolling.file"));
View Full Code Here

      l = (TopicalLogger) lf.getLogger("org.foo.bar5");
      l.addHandler( hf.getHandler("Handler_file"));

      //logger.org.foo.bar6.handler.0 Handler_file
      l = (TopicalLogger) lf.getLogger("org.foo.bar6");
      l.addHandler( hf.getHandler("Handler_file"));
      l.addHandler( hf.getHandler("Handler.rolling.file"));
    }
    catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
View Full Code Here

      l.addHandler( hf.getHandler("Handler_file"));

      //logger.org.foo.bar6.handler.0 Handler_file
      l = (TopicalLogger) lf.getLogger("org.foo.bar6");
      l.addHandler( hf.getHandler("Handler_file"));
      l.addHandler( hf.getHandler("Handler.rolling.file"));
    }
    catch (Exception e) {
      e.printStackTrace();
      fail(e.getMessage());
    }
View Full Code Here

        if (h == null) {
            throw new RemoteException("No handler '" + handlername + "' found.");
        }
        TopicalLogger l = (TopicalLogger) mf.getLogger(loggerName);
        try {
            l.addHandler(h);
        } catch (Exception e) {
            throw new RemoteException(e.getMessage());
        }
    }
View Full Code Here

        if (h == null) {
            return;
        }
        TopicalLogger l = (TopicalLogger) mf.getLogger(loggerName);
        try {
            l.addHandler(h);
        } catch (Exception e) {
            return;
        }
    }
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.