Package org.apache.uima.util

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


    if (context != null) {
      Logger logger = context.getLogger();
      if (logger != null && logger.isLoggable(level)) {
        String result = I18nUtil.localizeMessage(bundleName, msgKey, null,
                getExtensionClassLoader());
        logger.log(getClass().getName(), level, result, null);
      }
    }
  }

  public void logrb(Level level, String sourceClass, String sourceMethod, String bundleName,
View Full Code Here


    if (context != null) {
      Logger logger = context.getLogger();
      if (logger != null && logger.isLoggable(level)) {
        String result = I18nUtil.localizeMessage(bundleName, msgKey, new Object[] { param1 },
                getExtensionClassLoader());
        logger.log(getClass().getName(), level, result, null);
      }
    }
  }

  public void logrb(Level level, String sourceClass, String sourceMethod, String bundleName,
View Full Code Here

    if (context != null) {
      Logger logger = context.getLogger();
      if (logger != null && logger.isLoggable(level)) {
        String result = I18nUtil.localizeMessage(bundleName, msgKey, params,
                getExtensionClassLoader());
        logger.log(getClass().getName(), level, result, null);
      }
    }
  }

  public void logrb(Level level, String sourceClass, String sourceMethod, String bundleName,
View Full Code Here

    if (context != null) {
      Logger logger = context.getLogger();
      if (logger != null && logger.isLoggable(level)) {
        String result = I18nUtil.localizeMessage(bundleName, msgKey, null,
                getExtensionClassLoader());
        logger.log(getClass().getName(), level, result, thrown);
      }
    }
  }

  public void log(String wrapperFQCN, Level level, String message, Throwable thrown) {
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

      level = Level.WARNING;
    } else if (msglevel == TAF_LOGLEVEL_ERROR) {
      level = Level.SEVERE;
    }
    if (sourceMethod.length() > 0)
      uimacppLogger.log(level, sourceClass + "::" + sourceMethod + ": " + message);
    else
      uimacppLogger.log(level, sourceClass + ": " + message);

    // TODO: add Logger method log(level, sourceClass, sourceMethod, message);
  }
View Full Code Here

      // log end of event
      logger.logrb(Level.FINE, CLASS_NAME.getName(), "process", LOG_RESOURCE_BUNDLE,
              "UIMA_analysis_engine_process_end__FINE", resourceName);
    } catch (Exception e) {
      // log and rethrow exception
      logger.log(Level.SEVERE, "", e);
      if (e instanceof AnalysisEngineProcessException)
        throw (AnalysisEngineProcessException) e;
      else
        throw new AnalysisEngineProcessException(e);
    }
View Full Code Here

      level = Level.SEVERE;
    }
    if (sourceMethod.length() > 0)
      uimacppLogger.log(level, sourceClass + "::" + sourceMethod + ": " + message);
    else
      uimacppLogger.log(level, sourceClass + ": " + message);

    // TODO: add Logger method log(level, sourceClass, sourceMethod, message);
  }

  private static final int TAF_LOGLEVEL_OFF = 0;
View Full Code Here

      logger.logrb(Level.FINE, CLASS_NAME.getName(), "process", LOG_RESOURCE_BUNDLE,
              "UIMA_analysis_engine_process_end__FINE", resourceName);
      return iterator;
    } catch (Exception e) {
      // log and rethrow exception
      logger.log(Level.SEVERE, "", e);
      if (e instanceof AnalysisEngineProcessException)
        throw (AnalysisEngineProcessException) e;
      else
        throw new AnalysisEngineProcessException(e);
    }
View Full Code Here

      level = Level.WARNING;
    } else if (msglevel == TAF_LOGLEVEL_ERROR) {
      level = Level.SEVERE;
    }
    if (sourceMethod.length() > 0)
      uimacppLogger.log(level, sourceClass + "::" + sourceMethod + ": " + message);
    else
      uimacppLogger.log(level, sourceClass + ": " + message);

    // TODO: add Logger method log(level, sourceClass, sourceMethod, message);
  }
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.