Package org.apache.uima.util

Examples of org.apache.uima.util.Logger.log()


    // write log messages
    Logger logger = getContext().getLogger();
    logger.log(Level.CONFIG, "PersonTitleAnnotator initialized");
    logger.log(Level.CONFIG, "CivilianTitles = " + Arrays.asList(mCivilianTitles));
    logger.log(Level.CONFIG, "MilitaryTitles = " + Arrays.asList(mMilitaryTitles));
    logger.log(Level.CONFIG, "GovernmentTitles = " + Arrays.asList(mGovernmentTitles));
  }

  /**
   * Called whenever the CAS type system changes. Acquires references to Types and Features.
   *
 
View Full Code Here


   *
   * @see org.apache.uima.jcas.jcasgen_gen.IError#newError(int, java.lang.String)
   */
  public void newError(int severity, String message, Exception exception) {
    Logger log = UIMAFramework.getLogger();
    log.log(logLevels[severity], GUI.theGUI.pnG.showInStatus("JCasGen " + sevMsg[severity] + ": "
            + message), exception);
    if (null != exception) {
      ByteArrayOutputStream b = new ByteArrayOutputStream();
      PrintStream ps = new PrintStream(b);
      exception.printStackTrace(ps);
View Full Code Here

     *
     * @see org.apache.uima.jcas.jcasgen_gen.IError#newError(int, java.lang.String)
     */
    public void newError(int severity, String message, Exception ex) {
      Logger log = UIMAFramework.getLogger();
      log.log(logLevels[severity], "JCasGen: " + message); //$NON-NLS-1$
      System.out.println(Messages.getString("MultiPageEditor.JCasGenErr") //$NON-NLS-1$
              + message);
      if (null != ex)
        ex.printStackTrace();
      if (IError.WARN < severity) {
View Full Code Here

   *
   * @see org.apache.uima.jcas.jcasgen_gen.IError#newError(int, java.lang.String)
   */
  public void newError(int severity, String message, Exception exception) {
    Logger log = UIMAFramework.getLogger();
    log.log(logLevels[severity], "JCasGen: " + message, exception);
    if (IError.WARN < severity)
      throw new ErrorExit();
  }
}
View Full Code Here

  @Deprecated
  public void log(String aMessage) {
    if (context != null) {
      Logger logger = context.getLogger();
      if (logger != null) {
        logger.log(aMessage);
      }
    }
  }

  @Deprecated
View Full Code Here

  @Deprecated
  public void log(String aResourceBundleName, String aMessageKey, Object[] aArguments) {
    if (context != null) {
      Logger logger = context.getLogger();
      if (logger != null) {
        logger.log(aResourceBundleName, aMessageKey, aArguments);
      }
    }
  }

  @Deprecated
View Full Code Here

  public void log(Level level, String aMessage) {
    if (context != null) {
      Logger logger = context.getLogger();
      if (logger != null && logger.isLoggable(level)) {
        logger.log(getClass().getName(), level, aMessage, null);
      }
    }
  }

  public void log(Level level, String aMessage, Object param1) {
View Full Code Here

  public void log(Level level, String aMessage, Object param1) {
    if (context != null) {
      Logger logger = context.getLogger();
      if (logger != null && logger.isLoggable(level)) {
        String result = MessageFormat.format(aMessage, new Object[] { param1 });
        logger.log(getClass().getName(), level, result, null);
      }
    }
  }

  public void log(Level level, String aMessage, Object[] params) {
View Full Code Here

  public void log(Level level, String aMessage, Object[] params) {
    if (context != null) {
      Logger logger = context.getLogger();
      if (logger != null && logger.isLoggable(level)) {
        String result = MessageFormat.format(aMessage, params);
        logger.log(getClass().getName(), level, result, null);
      }
    }
  }

  public void log(Level level, String aMessage, Throwable thrown) {
View Full Code Here

  public void log(Level level, String aMessage, Throwable thrown) {
    if (context != null) {
      Logger logger = context.getLogger();
      if (logger != null && logger.isLoggable(level)) {
        logger.log(getClass().getName(), level, aMessage, thrown);
      }
    }
  }

  public void logrb(Level level, String sourceClass, String sourceMethod, String bundleName,
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.