org.apache.uima.util.Logger.isLoggable()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(7.6k)|赞(0)|评价(0)|浏览(142)

本文整理了Java中org.apache.uima.util.Logger.isLoggable()方法的一些代码示例,展示了Logger.isLoggable()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isLoggable()方法的具体详情如下:
包路径:org.apache.uima.util.Logger
类名称:Logger
方法名:isLoggable

Logger.isLoggable介绍

[英]Checks if the argument level is greater or equal to the specified level
[中]检查参数级别是否大于或等于指定级别

代码示例

代码示例来源:origin: org.apache.uima/uimaj-as-core

  1. public void onNewSamplingInterval() {
  2. if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
  3. UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "run",
  4. UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_marker_INFO", new Object[] {});
  5. }
  6. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Maybe log severe.
  3. *
  4. * @param msgBundleId the msg bundle id
  5. */
  6. private void maybeLogSevere(String msgBundleId) {
  7. if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {
  8. logCPM(Level.SEVERE, msgBundleId, null);
  9. }
  10. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Stops the checkpoint thread.
  3. */
  4. public void stop() {
  5. stop = true;
  6. // isRunning = false;
  7. if (UIMAFramework.getLogger().isLoggable(Level.INFO)) {
  8. UIMAFramework.getLogger(this.getClass()).logrb(Level.INFO, this.getClass().getName(),
  9. "process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_stop_checkpoint_thread__INFO",
  10. new Object[] { Thread.currentThread().getName() });
  11. }
  12. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Maybe log finest.
  3. *
  4. * @param msgBundleId the msg bundle id
  5. * @param arg1 the arg 1
  6. */
  7. // 1 arg
  8. private void maybeLogFinest(String msgBundleId, String arg1) {
  9. if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
  10. logFinest(msgBundleId, arg1);
  11. }
  12. }

代码示例来源:origin: org.apache.uima/uimaj-as-jms

  1. protected void acquireCpcReadySemaphore() {
  2. try {
  3. // Acquire cpcReady semaphore to block sending CPC request until
  4. // ALL outstanding CASes are received.
  5. cpcReadySemaphore.acquire();
  6. } catch (InterruptedException e) {
  7. if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
  8. UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
  9. "collectionProcessingComplete", JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
  10. "UIMAJMS_client_interrupted_while_acquiring_cpcReadySemaphore__WARNING", new Object[] {});
  11. }
  12. }
  13. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Maybe log severe.
  3. *
  4. * @param msgBundleId the msg bundle id
  5. * @param arg1 the arg 1
  6. * @param arg2 the arg 2
  7. */
  8. private void maybeLogSevere(String msgBundleId, String arg1, String arg2) {
  9. if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {
  10. logSevere(msgBundleId, arg1, arg2);
  11. }
  12. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Called when the initialization is completed.
  3. *
  4. * @see org.apache.uima.collection.processing.StatusCallbackListener#initializationComplete()
  5. */
  6. public void initializationComplete() {
  7. if (UIMAFramework.getLogger().isLoggable(Level.CONFIG)) {
  8. UIMAFramework.getLogger(this.getClass()).logrb(Level.CONFIG, this.getClass().getName(),
  9. "process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_cpm_init_complete__CONFIG",
  10. new Object[] { Thread.currentThread().getName() });
  11. }
  12. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Maybe log finest.
  3. *
  4. * @param msgBundleId the msg bundle id
  5. * @param casCache the cas cache
  6. */
  7. private void maybeLogFinest(String msgBundleId, CAS [] casCache) {
  8. if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
  9. logFinest(msgBundleId, String.valueOf(casCache == null));
  10. }
  11. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Called when the collection processing is completed.
  3. *
  4. * @see org.apache.uima.collection.processing.StatusCallbackListener#collectionProcessComplete()
  5. */
  6. public synchronized void collectionProcessComplete() {
  7. if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
  8. UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
  9. "process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_method_ping__FINEST",
  10. new Object[] { Thread.currentThread().getName() });
  11. }
  12. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Maybe log memory finest.
  3. */
  4. private void maybeLogMemoryFinest() {
  5. if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
  6. logMemoryFinest();
  7. }
  8. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Called when the CPM is paused.
  3. *
  4. * @see org.apache.uima.collection.processing.StatusCallbackListener#paused()
  5. */
  6. public synchronized void paused() {
  7. if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
  8. UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
  9. "process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_paused__FINEST",
  10. new Object[] { Thread.currentThread().getName() });
  11. }
  12. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Maybe log severe.
  3. *
  4. * @param msgBundleId the msg bundle id
  5. * @param arg1 the arg 1
  6. * @param arg2 the arg 2
  7. * @param arg3 the arg 3
  8. */
  9. private void maybeLogSevere(String msgBundleId, String arg1, String arg2, String arg3) {
  10. if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {
  11. logSevere(msgBundleId, arg1, arg2, arg3);
  12. }
  13. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Called when the CPM is resumed after a pause.
  3. *
  4. * @see org.apache.uima.collection.processing.StatusCallbackListener#resumed()
  5. */
  6. public synchronized void resumed() {
  7. if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
  8. UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
  9. "process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_resumed__FINEST",
  10. new Object[] { Thread.currentThread().getName() });
  11. }
  12. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Maybe log finest.
  3. *
  4. * @param msgBundleId the msg bundle id
  5. */
  6. // 0 arg
  7. private void maybeLogFinest(String msgBundleId) {
  8. if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
  9. logFinest(msgBundleId);
  10. }
  11. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Called when the CPM is stopped abruptly due to errors.
  3. *
  4. * @see org.apache.uima.collection.processing.StatusCallbackListener#aborted()
  5. */
  6. public void aborted() {
  7. if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
  8. UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
  9. "process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_stopped__FINEST",
  10. new Object[] { Thread.currentThread().getName() });
  11. }
  12. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Maybe log finest.
  3. *
  4. * @param msgBundleId the msg bundle id
  5. * @param processor the processor
  6. */
  7. private void maybeLogFinest(String msgBundleId, CasProcessor processor) {
  8. if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
  9. logFinest(msgBundleId, processor.getClass().getName());
  10. }
  11. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Pauses this thread.
  3. */
  4. public void pauseIt() {
  5. if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
  6. UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
  7. "process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_pause_cpe__FINEST",
  8. new Object[] { Thread.currentThread().getName() });
  9. }
  10. synchronized (lockForPause) {
  11. pause = true;
  12. }
  13. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Maybe log warning.
  3. *
  4. * @param msgBundleId the msg bundle id
  5. * @param arg1 the arg 1
  6. * @param arg2 the arg 2
  7. */
  8. private void maybeLogWarning(String msgBundleId, String arg1, String arg2) {
  9. if (UIMAFramework.getLogger().isLoggable(Level.WARNING)) {
  10. logWarning(msgBundleId, arg1, arg2);
  11. }
  12. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Called when the batchProcessing is completed.
  3. *
  4. * @see org.apache.uima.collection.processing.StatusCallbackListener#batchProcessComplete()
  5. *
  6. */
  7. public synchronized void batchProcessComplete() {
  8. if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
  9. UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
  10. "process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_method_ping__FINEST",
  11. new Object[] { Thread.currentThread().getName() });
  12. }
  13. }

代码示例来源:origin: org.apache.uima/uimaj-cpe

  1. /**
  2. * Maybe log severe.
  3. *
  4. * @param msgBundleId the msg bundle id
  5. * @param arg1 the arg 1
  6. */
  7. private void maybeLogSevere(String msgBundleId, String arg1) {
  8. if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {
  9. logSevere(msgBundleId, arg1);
  10. }
  11. }

相关文章