當前位置: 首頁>>代碼示例>>Java>>正文


Java ILoggingEvent.getMarker方法代碼示例

本文整理匯總了Java中ch.qos.logback.classic.spi.ILoggingEvent.getMarker方法的典型用法代碼示例。如果您正苦於以下問題:Java ILoggingEvent.getMarker方法的具體用法?Java ILoggingEvent.getMarker怎麽用?Java ILoggingEvent.getMarker使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ch.qos.logback.classic.spi.ILoggingEvent的用法示例。


在下文中一共展示了ILoggingEvent.getMarker方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: matches

import ch.qos.logback.classic.spi.ILoggingEvent; //導入方法依賴的package包/類
public boolean matches(ILoggingEvent event) {
	Marker marker = event.getMarker();
	if(marker != null) {
		return matches(marker);
	}
	
	return false;
}
 
開發者ID:skjolber,項目名稱:json-log-domain,代碼行數:9,代碼來源:AbstractMarkerMatcher.java

示例2: customFieldsAppender

import ch.qos.logback.classic.spi.ILoggingEvent; //導入方法依賴的package包/類
private void customFieldsAppender(StringBuilder sb, ILoggingEvent iLoggingEvent)
{
    Marker marker = iLoggingEvent.getMarker();
    if ( marker != null && marker instanceof LogFmtMarker )
    {
        LogFmtMarker keyValueMarker = (LogFmtMarker) marker;
        keyValueMarker.forEach((k, v) ->
        {
            if ( !isNativeKey(k) )
            {
                appendKeyValueAndEscape(sb, k, v);
            }
        });
    }
}
 
開發者ID:BatchLabs,項目名稱:escalog,代碼行數:16,代碼來源:LogFmtLayout.java

示例3: decide

import ch.qos.logback.classic.spi.ILoggingEvent; //導入方法依賴的package包/類
@Override
public FilterReply decide(ILoggingEvent event) {
    Marker eventMarker = event.getMarker();
    if (isStarted() && (eventMarker == null || !eventMarker.contains(METRIC_MARKER))) {
        return FilterReply.DENY;
    } else {
        return FilterReply.NEUTRAL;
    }
}
 
開發者ID:symphoniacloud,項目名稱:lambda-monitoring,代碼行數:10,代碼來源:MetricPassFilter.java

示例4: decide

import ch.qos.logback.classic.spi.ILoggingEvent; //導入方法依賴的package包/類
@Override
public FilterReply decide(ILoggingEvent event) {
    Marker eventMarker = event.getMarker();
    if (isStarted() && eventMarker != null && eventMarker.contains(MetricPassFilter.METRIC_MARKER)) {
        return FilterReply.DENY;
    }
    return FilterReply.NEUTRAL;
}
 
開發者ID:symphoniacloud,項目名稱:lambda-monitoring,代碼行數:9,代碼來源:MetricBlockFilter.java

示例5: matches

import ch.qos.logback.classic.spi.ILoggingEvent; //導入方法依賴的package包/類
protected boolean matches(ILoggingEvent event) {
	if (loggerName != null) {
		if (!event.getLoggerName().equals(loggerName)) {
			return false;
		}
	}
	if (level != null) {
		if (!event.getLevel().isGreaterOrEqual(level)) {
			return false;
		}
	}
	Marker marker = event.getMarker();
	if (marker == null) {
		return false;
	}
	
	if(key != null) {
		if(qualifier != null) {
			DomainMarker qualifiedMarker = find(qualifier, marker);
			if (qualifiedMarker != null) {
				Object value = getter(qualifiedMarker, key);
				
				return matcher.matches(value);
			}
		} else {
			
			if(matchMarker(marker)) {
				return true;
			}
			if(marker.hasReferences()) {
				Iterator<Marker> iterator = marker.iterator();
				while(iterator.hasNext()) {
					if(matchMarker(iterator.next())) {
						return true;
					}
				}
			}
			
		}
	}
	
	return false;
}
 
開發者ID:skjolber,項目名稱:json-log-domain,代碼行數:44,代碼來源:GenericMarkerMatcher.java


注:本文中的ch.qos.logback.classic.spi.ILoggingEvent.getMarker方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。