当前位置: 首页>>代码示例>>Java>>正文


Java Marker类代码示例

本文整理汇总了Java中org.slf4j.Marker的典型用法代码示例。如果您正苦于以下问题:Java Marker类的具体用法?Java Marker怎么用?Java Marker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Marker类属于org.slf4j包,在下文中一共展示了Marker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getLoggingMarker

import org.slf4j.Marker; //导入依赖的package包/类
public Marker getLoggingMarker() {
    // If we get more optional header fields, we should probably exclude them if they are empty.
    Marker messageMarker =
            append("messageId", messageId)
                    .and(append("partitionId", partitionId))
                    .and(append("partitioningKey", partitioningKey))
                    .and(append("offset", offset))
                    .and(append("messageId", messageId))
                    .and(append("correlationId", correlationId))
                    .and(append("requestCorrelationId", requestCorrelationId));


    // Nota bene: without the toString the marker tries to convert the object into Json, which produces strange results
    if (topic != null) {
        messageMarker.add(append("topic", topic.toString()));
    }
    if (replyTo != null) {
        messageMarker.add(append("replyTo", replyTo.toString()));
    }
    if (type != null) {
        messageMarker.add(append("messageType", type.toString()));
    }

    return messageMarker;
}
 
开发者ID:Sixt,项目名称:ja-micro,代码行数:26,代码来源:Metadata.java

示例2: decide

import org.slf4j.Marker; //导入依赖的package包/类
@Override
public FilterReply decide(Marker marker, Logger logger, Level level, String format, Object[] params, Throwable t) {
    // cannot use logger.isEnabledFor(level), as it would cause a StackOverflowError by calling this filter again!
    if(level.isGreaterOrEqual(logger.getEffectiveLevel()) && format != null) {
        switch (level.toInt()) {
            case Level.ERROR_INT:
                errorCounter.increment();
                break;
            case Level.WARN_INT:
                warnCounter.increment();
                break;
            case Level.INFO_INT:
                infoCounter.increment();
                break;
            case Level.DEBUG_INT:
                debugCounter.increment();
                break;
            case Level.TRACE_INT:
                traceCounter.increment();
                break;
        }
    }

    return FilterReply.NEUTRAL;
}
 
开发者ID:micrometer-metrics,项目名称:micrometer,代码行数:26,代码来源:LogbackMetrics.java

示例3: matches

import org.slf4j.Marker; //导入依赖的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

示例4: populate

import org.slf4j.Marker; //导入依赖的package包/类
private void populate(Marker marker, List<DomainMarker> markers, boolean mdc) {
	if (marker instanceof DomainMarker) {
		DomainMarker domainMarker = (DomainMarker)marker;

		if(mdc) {
			DomainMarker parent = domainMarker.getParent(); // assume from mdc context
			if(parent != null) {
				markers.add(parent);
			}
		} else {
			markers.add(domainMarker);
		}
	} else if(marker instanceof DeferredMdcMarker) {
		DeferredMdcMarker deferredMdcMarker = (DeferredMdcMarker)marker;
		
		for(DomainMarker mdcMarker : deferredMdcMarker.getMarkers()) {
			markers.add(mdcMarker);
		}
	}
	
	if(marker.hasReferences()) {
    	Iterator<Marker> iterator = marker.iterator();
    	while(iterator.hasNext()) {
    		populate(iterator.next(), markers, mdc);
    	}
   	}
}
 
开发者ID:skjolber,项目名称:json-log-domain,代码行数:28,代码来源:ContainsMdcMarkerMatcher.java

示例5: isTraceEnabled

import org.slf4j.Marker; //导入依赖的package包/类
public boolean isTraceEnabled(Marker marker) {
    return isTraceEnabled();
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:4,代码来源:OutputEventListenerBackedLogger.java

示例6: isDebugEnabled

import org.slf4j.Marker; //导入依赖的package包/类
@Override
public boolean isDebugEnabled(Marker arg0) {
    return false;
}
 
开发者ID:personium,项目名称:personium-core,代码行数:5,代码来源:PersoniumCoreExceptionMapperTest.java

示例7: debug

import org.slf4j.Marker; //导入依赖的package包/类
@Override
public void debug(final Marker marker, final String format, final Object arg) {
    delegate.debug(marker, manipulateLogMessage(format), manipulateLogArguments(arg));
}
 
开发者ID:yuweijun,项目名称:cas-server-4.2.1,代码行数:5,代码来源:CasDelegatingLogger.java

示例8: error

import org.slf4j.Marker; //导入依赖的package包/类
@Override
public void error(final Marker marker, final String format, final Object arg) {
    delegate.error(marker, manipulateLogMessage(format), manipulateLogArguments(arg));
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:5,代码来源:CasDelegatingLogger.java

示例9: trace

import org.slf4j.Marker; //导入依赖的package包/类
public void trace(Marker marker, String msg) {
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:3,代码来源:OutputEventListenerBackedLogger.java

示例10: debug

import org.slf4j.Marker; //导入依赖的package包/类
@Override
public void debug(Marker marker, String s, Object o, Object o1)
{
    underlying.debug(marker, s, o, o1);
}
 
开发者ID:BatchLabs,项目名称:escalog,代码行数:6,代码来源:LogFmt.java

示例11: warn

import org.slf4j.Marker; //导入依赖的package包/类
@Override
public void warn(final Marker marker, final String format, final Object arg1, final Object arg2) {
    delegate.warn(marker, manipulateLogMessage(format), manipulateLogArguments(arg1, arg2));
}
 
开发者ID:hsj-xiaokang,项目名称:springboot-shiro-cas-mybatis,代码行数:5,代码来源:CasDelegatingLogger.java

示例12: debug

import org.slf4j.Marker; //导入依赖的package包/类
@Override
public void debug(Marker arg0, String arg1, Throwable arg2) {
}
 
开发者ID:personium,项目名称:personium-core,代码行数:4,代码来源:PersoniumCoreLogTest.java

示例13: warn

import org.slf4j.Marker; //导入依赖的package包/类
/**
 * {@link #warn(org.slf4j.Marker, java.lang.String, java.lang.Throwable)} with a lambda message supplier.
 */
default void warn(Marker marker, Supplier<String> msgSupplier, Throwable t) {
    doLog(marker, Level.WARN, msgSupplier, t);
}
 
开发者ID:kwon37xi,项目名称:slf4j-lambda,代码行数:7,代码来源:LambdaLogger.java

示例14: debug

import org.slf4j.Marker; //导入依赖的package包/类
@Override
public void debug(Marker marker, String format, Object arg) {
	if (shouldLog()) {
		delegate.debug(marker, format, arg);
	}
}
 
开发者ID:zhangjunfang,项目名称:util,代码行数:7,代码来源:ThrottledSlf4jLogger.java

示例15: info

import org.slf4j.Marker; //导入依赖的package包/类
/**
 * {@link #info(org.slf4j.Marker, java.lang.String)} with a lambda message supplier.
 */
default void info(Marker marker, Supplier<String> msgSupplier) {
    doLog(marker, Level.INFO, msgSupplier, null);
}
 
开发者ID:kwon37xi,项目名称:slf4j-lambda,代码行数:7,代码来源:LambdaLogger.java


注:本文中的org.slf4j.Marker类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。