Examples of logEvent()


Examples of org.apache.logging.log4j.samples.dto.AuditEvent.logEvent()

                        // Write rand number of logs
                        for (int i = 0; i < rand; i++) {
                            final int eventIndex = (Math.abs(ran.nextInt())) % events.size();
                            final AuditEvent event = events.get(eventIndex);
                            RequestContext.setUserId(member);
                            event.logEvent();

                            if ((rand % 4) == 1) {
                                logger.debug("DEBUG level logging.....");
                            } else if ((rand % 4) == 2) {
                                logger.info("INFO level logging.....");
View Full Code Here

Examples of org.apache.logging.log4j.samples.dto.AuditEvent.logEvent()

                    // Write rand number of logs
                    for (int i = 0; i < rand; i++) {
                        final int eventIndex = (Math.abs(ran.nextInt())) % events.size();
                        final AuditEvent event = events.get(eventIndex);
                        RequestContext.setUserId(member);
                        event.logEvent();

                        if ((rand % 4) == 1) {
                            logger.debug("DEBUG level logging.....");
                        } else if ((rand % 4) == 2) {
                            logger.info("INFO level logging.....");
View Full Code Here

Examples of org.apache.logging.log4j.samples.dto.AuditEvent.logEvent()

                // Write rand number of logs
                for (int i = 0; i < rand; i++) {
                    final int eventIndex = (Math.abs(ran.nextInt())) % events.size();
                    final AuditEvent event = events.get(eventIndex);
                    RequestContext.setUserId(member);
                    event.logEvent();

                    if ((rand % 4) == 1) {
                        logger.debug("DEBUG level logging.....");
                    } else if ((rand % 4) == 2) {
                        logger.info("INFO level logging.....");
View Full Code Here

Examples of org.ejbca.core.model.log.LogConfiguration.logEvent()

      final LogConfiguration config = logConfigurationSession.loadLogConfiguration(caid);
      final Iterator<ILogDevice> i = logdevices.iterator();
      while (i.hasNext()) {
        final ILogDevice dev = i.next();
        try {
            if (!dev.getAllowConfigurableEvents() || config.logEvent(event)) {
              dev.log(admin, caid, module, time, username, certificate, event, comment, ex);
            }
        } catch (Throwable e) { // NOPMD, we really want to catch every possible error from the log device
              LOG.error(INTRES.getLocalizedMessage("log.error.logdropped",admin.getAdminType()+" "+admin.getAdminData()+" "
                  +caid+" "+" "+module+" "+" "+time+" "+username+" "+(certificate==null?"null":CertTools.getSerialNumberAsString(certificate)+" "
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.misc.ClassificationEvaluator.logEvent()

      Collection<String> f = overallFeatures.get(word);
      String type = chemFeatures.containsKey(word) ? "CHEM" : "NONCHEM";
     
      double [] results = gm.eval(f.toArray(new String[0]));
      System.out.println(word + "\t" + gm.getAllOutcomes(results));
      ce.logEvent(type, gm.getBestOutcome(results));
      if(!gm.getBestOutcome(results).equals(type)) System.out.println("*");
      if(type.equals("CHEM")) {
        chemList.add(results[gm.getIndex("CHEM")]);
      } else {
        engList.add(results[gm.getIndex("CHEM")]);
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.misc.ClassificationEvaluator.logEvent()

        System.out.println(word + "\t" + bestWord);
        if(!type.equals(testType)) {
          System.out.println("*");
        }
       
        ce2.logEvent(type, testType);
      }
      ce2.pprintPrecisionRecallEval();     
    }
  }

View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.misc.ClassificationEvaluator.logEvent()

      DecisionTree dt = new DecisionTree(bagEvents);
      dt.printTree();
      for(int i=0;i<testBagEvents.size();i++) {
        BagEvent be = testBagEvents.get(i);
        String result = dt.testBag(be.getFeatures());
        ce.logEvent(be.getClassLabel(), result);
      }
      System.out.println(ce.getAccuracy());
      System.out.println(ce.getKappa());     
      ce.pprintConfusionMatrix();
      ce.pprintPrecisionRecallEval();
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.misc.ClassificationEvaluator.logEvent()

      ce = new ClassificationEvaluator();
      DecisionList dl = new DecisionList(bagEvents);
      for(int i=0;i<testBagEvents.size();i++) {
        BagEvent be = testBagEvents.get(i);
        String result = dl.testBag(be.getFeatures());
        ce.logEvent(be.getClassLabel(), result);
      }
      System.out.println(ce.getAccuracy());
      System.out.println(ce.getKappa());     
      ce.pprintConfusionMatrix();
      ce.pprintPrecisionRecallEval();
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.misc.ClassificationEvaluator.logEvent()

    for(int i=0;i<testBagEvents.size();i++) {
      BagEvent be = testBagEvents.get(i);
      //Map<String,Double> results = mnb.testBag(be.getClassLabel(), be.getFeatures());
      Map<String,Double> results = mnb.testBag(be.getFeatures());
      System.out.println(be.getClassLabel() + "\t" + mnb.testBag(be.getFeatures()));
      ce.logEvent(be.getClassLabel(), mnb.bestResult(results));
    }
    System.out.println(ce.getAccuracy());
    System.out.println(ce.getKappa());     
    ce.pprintConfusionMatrix();
    ce.pprintPrecisionRecallEval();
View Full Code Here

Examples of uk.ac.cam.ch.wwmm.ptclib.misc.ClassificationEvaluator.logEvent()

    for(Event event : testEvents) {
      double [] results = gm.eval(event.getContext());
      String result = results[gm.getIndex("TRUE")] > 0.5 ? "TRUE" : "FALSE";
      //String result = gm.getBestOutcome(results);
      //System.out.println(event.getOutcome() + "\t" + result + "\t" + results[gm.getIndex(event.getOutcome())] + "\t" + StringTools.arrayToList(event.getContext()));
      ce.logEvent(event.getOutcome(), result);
    }
    System.out.println(ce.getAccuracy());
    System.out.println(ce.getKappa());     
    ce.pprintConfusionMatrix();
    ce.pprintPrecisionRecallEval();
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.