当前位置: 首页>>代码示例>>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;未经允许,请勿转载。