本文整理了Java中org.apache.uima.util.Logger.isLoggable()
方法的一些代码示例,展示了Logger.isLoggable()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.isLoggable()
方法的具体详情如下:
包路径:org.apache.uima.util.Logger
类名称:Logger
方法名:isLoggable
[英]Checks if the argument level is greater or equal to the specified level
[中]检查参数级别是否大于或等于指定级别
代码示例来源:origin: org.apache.uima/uimaj-as-core
public void onNewSamplingInterval() {
if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "run",
UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_marker_INFO", new Object[] {});
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Maybe log severe.
*
* @param msgBundleId the msg bundle id
*/
private void maybeLogSevere(String msgBundleId) {
if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {
logCPM(Level.SEVERE, msgBundleId, null);
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Stops the checkpoint thread.
*/
public void stop() {
stop = true;
// isRunning = false;
if (UIMAFramework.getLogger().isLoggable(Level.INFO)) {
UIMAFramework.getLogger(this.getClass()).logrb(Level.INFO, this.getClass().getName(),
"process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_stop_checkpoint_thread__INFO",
new Object[] { Thread.currentThread().getName() });
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Maybe log finest.
*
* @param msgBundleId the msg bundle id
* @param arg1 the arg 1
*/
// 1 arg
private void maybeLogFinest(String msgBundleId, String arg1) {
if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
logFinest(msgBundleId, arg1);
}
}
代码示例来源:origin: org.apache.uima/uimaj-as-jms
protected void acquireCpcReadySemaphore() {
try {
// Acquire cpcReady semaphore to block sending CPC request until
// ALL outstanding CASes are received.
cpcReadySemaphore.acquire();
} catch (InterruptedException e) {
if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
"collectionProcessingComplete", JmsConstants.JMS_LOG_RESOURCE_BUNDLE,
"UIMAJMS_client_interrupted_while_acquiring_cpcReadySemaphore__WARNING", new Object[] {});
}
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Maybe log severe.
*
* @param msgBundleId the msg bundle id
* @param arg1 the arg 1
* @param arg2 the arg 2
*/
private void maybeLogSevere(String msgBundleId, String arg1, String arg2) {
if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {
logSevere(msgBundleId, arg1, arg2);
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Called when the initialization is completed.
*
* @see org.apache.uima.collection.processing.StatusCallbackListener#initializationComplete()
*/
public void initializationComplete() {
if (UIMAFramework.getLogger().isLoggable(Level.CONFIG)) {
UIMAFramework.getLogger(this.getClass()).logrb(Level.CONFIG, this.getClass().getName(),
"process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_cpm_init_complete__CONFIG",
new Object[] { Thread.currentThread().getName() });
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Maybe log finest.
*
* @param msgBundleId the msg bundle id
* @param casCache the cas cache
*/
private void maybeLogFinest(String msgBundleId, CAS [] casCache) {
if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
logFinest(msgBundleId, String.valueOf(casCache == null));
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Called when the collection processing is completed.
*
* @see org.apache.uima.collection.processing.StatusCallbackListener#collectionProcessComplete()
*/
public synchronized void collectionProcessComplete() {
if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
"process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_method_ping__FINEST",
new Object[] { Thread.currentThread().getName() });
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Maybe log memory finest.
*/
private void maybeLogMemoryFinest() {
if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
logMemoryFinest();
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Called when the CPM is paused.
*
* @see org.apache.uima.collection.processing.StatusCallbackListener#paused()
*/
public synchronized void paused() {
if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
"process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_paused__FINEST",
new Object[] { Thread.currentThread().getName() });
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Maybe log severe.
*
* @param msgBundleId the msg bundle id
* @param arg1 the arg 1
* @param arg2 the arg 2
* @param arg3 the arg 3
*/
private void maybeLogSevere(String msgBundleId, String arg1, String arg2, String arg3) {
if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {
logSevere(msgBundleId, arg1, arg2, arg3);
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Called when the CPM is resumed after a pause.
*
* @see org.apache.uima.collection.processing.StatusCallbackListener#resumed()
*/
public synchronized void resumed() {
if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
"process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_resumed__FINEST",
new Object[] { Thread.currentThread().getName() });
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Maybe log finest.
*
* @param msgBundleId the msg bundle id
*/
// 0 arg
private void maybeLogFinest(String msgBundleId) {
if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
logFinest(msgBundleId);
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Called when the CPM is stopped abruptly due to errors.
*
* @see org.apache.uima.collection.processing.StatusCallbackListener#aborted()
*/
public void aborted() {
if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
"process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_stopped__FINEST",
new Object[] { Thread.currentThread().getName() });
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Maybe log finest.
*
* @param msgBundleId the msg bundle id
* @param processor the processor
*/
private void maybeLogFinest(String msgBundleId, CasProcessor processor) {
if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
logFinest(msgBundleId, processor.getClass().getName());
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Pauses this thread.
*/
public void pauseIt() {
if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
"process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_pause_cpe__FINEST",
new Object[] { Thread.currentThread().getName() });
}
synchronized (lockForPause) {
pause = true;
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Maybe log warning.
*
* @param msgBundleId the msg bundle id
* @param arg1 the arg 1
* @param arg2 the arg 2
*/
private void maybeLogWarning(String msgBundleId, String arg1, String arg2) {
if (UIMAFramework.getLogger().isLoggable(Level.WARNING)) {
logWarning(msgBundleId, arg1, arg2);
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Called when the batchProcessing is completed.
*
* @see org.apache.uima.collection.processing.StatusCallbackListener#batchProcessComplete()
*
*/
public synchronized void batchProcessComplete() {
if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {
UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),
"process", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, "UIMA_CPM_method_ping__FINEST",
new Object[] { Thread.currentThread().getName() });
}
}
代码示例来源:origin: org.apache.uima/uimaj-cpe
/**
* Maybe log severe.
*
* @param msgBundleId the msg bundle id
* @param arg1 the arg 1
*/
private void maybeLogSevere(String msgBundleId, String arg1) {
if (UIMAFramework.getLogger().isLoggable(Level.SEVERE)) {
logSevere(msgBundleId, arg1);
}
}
内容来源于网络,如有侵权,请联系作者删除!