Package org.apache.log4j

Examples of org.apache.log4j.Logger.fatal()


    log4jLogger.trace("msg" +(n++));
    log4jLogger.debug("msg" +(n++));
    log4jLogger.info("msg" +(n++));
    log4jLogger.warn("msg" +(n++));
    log4jLogger.error("msg" +(n++));
    log4jLogger.fatal("msg" +(n++));
   
    log4jCategory.debug("msg" +(n++));
    log4jCategory.info("msg" +(n++));
    log4jCategory.warn("msg" +(n++));
    log4jCategory.error("msg" +(n++));
View Full Code Here


    l.trace("t");
    l.debug("d");
    l.info("i");
    l.warn("w");
    l.error("e");
    l.fatal("f");

    Exception e = new Exception("testing");
    l.trace("t", e);
    l.debug("d", e);
    l.info("i", e);
View Full Code Here

    l.trace("t", e);
    l.debug("d", e);
    l.info("i", e);
    l.warn("w", e);
    l.error("e", e);
    l.fatal("f", e);
  }

}
View Full Code Here

  //*-- loop through the list of categories and verify that a directory exists for each one.
  for (int i = 0; i < CATEGORIES.length; ++i)
  {
   File classDir = new File(TRAINING_DIR, CATEGORIES[i]);
   if (!classDir.isDirectory())
   { logger.fatal("Could not find training directory=" + classDir); }

   //*-- get the list of training files for the category and train the classifier on each of the files
   String[] trainingFiles = classDir.list();
   for (int j=0; j<trainingFiles.length; ++j)
   {
View Full Code Here

  Parser parser = new BrownPosParser();
  parser.setHandler(estimator);

  //*-- train on files in data directory ending in "txt"
  if (!TRAINING_DIR.isDirectory())
  { logger.fatal("Could not find training directory=" + TRAINING_DIR); }
  File[] files = TRAINING_DIR.listFiles(new FileExtensionFilter("txt"));
  for (int i = 0; i < files.length; ++i)
  { logger.debug("Training on file: " + files[i]); parser.parse(files[i]); }

  //*-- write output to file
View Full Code Here

  //*-- loop through the list of categories and verify that a directory exists for each one.
  for (int i = 0; i < CATEGORIES.length; ++i)
  {
   File classDir = new File(TRAINING_DIR, CATEGORIES[i]);
   if (!classDir.isDirectory())
   { logger.fatal("Could not find training directory=" + classDir); }

   //*-- get the list of training files for the category and train the classifier on each of the files
   String[] trainingFiles = classDir.list();
   for (int j = 0; j < trainingFiles.length; ++j)
   {
View Full Code Here

  //*-- loop through the list of categories and verify that a directory exists for each one.
  for (int i = 0; i < CATEGORIES.length; ++i)
  {
   File classDir = new File(TRAINING_DIR, CATEGORIES[i]);
   if (!classDir.isDirectory())
   { logger.fatal("Could not find training directory for category: " + classDir); }

   //*-- get the list of training files for the category and train the classifier on each of the files
   String[] trainingFiles = classDir.list();
   for (int j = 0; j < trainingFiles.length; ++j)
   {
View Full Code Here

   
    // log a fatal event
    myLogger.info("info: I have died of thirst");
    myLogger.warn("warn: I have died of thirst");
    myLogger.error("error: I have died of thirst");
    myLogger.fatal("fatal: I have died of thirst");

  }
}
View Full Code Here

    logger.trace(msg);
    logger.debug(msg);
    logger.info(msg);
    logger.warn(msg);
    logger.error(msg);
    logger.fatal(msg);
  }

  public static Test suite() {
    TestSuite suite = new TestSuite();
    suite.addTest(new LevelMatchFilterTestCase("accept"));
View Full Code Here

            } else if (Level.WARN == level) {
                logger.warn(message, t);
            } else if (Level.ERROR == level) {
                logger.error(message, t);
            } else if (Level.FATAL == level) {
                logger.fatal(message, t);
            }
        }
    }

    /**
 
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.