本文整理汇总了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;
}