本文整理匯總了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;
}
示例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);
}
});
}
}
示例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;
}
}
示例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;
}
示例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;
}