本文整理汇总了Java中ch.qos.logback.classic.spi.LoggerContextVO类的典型用法代码示例。如果您正苦于以下问题:Java LoggerContextVO类的具体用法?Java LoggerContextVO怎么用?Java LoggerContextVO使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
LoggerContextVO类属于ch.qos.logback.classic.spi包,在下文中一共展示了LoggerContextVO类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: make
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
static public ILoggingEvent[] make(CorpusModel corpusModel, int n,
boolean withCallerData) {
LoggerContextVO lcVO = corpusModel.getRandomlyNamedLoggerContextVO();
PubLoggingEventVO[] plevoArray = new PubLoggingEventVO[n];
for (int i = 0; i < n; i++) {
PubLoggingEventVO e = new PubLoggingEventVO();
plevoArray[i] = e;
e.loggerContextVO = lcVO;
e.timeStamp = corpusModel.getRandomTimeStamp();
LogStatement logStatement = corpusModel.getRandomLogStatementFromPool();
e.loggerName = logStatement.loggerName;
e.level = logStatement.level;
e.message = logStatement.mat.message;
e.argumentArray = corpusModel
.getRandomArgumentArray(logStatement.mat.numberOfArguments);
if (withCallerData) {
e.callerDataArray = corpusModel.getRandomCallerData(
ClassicConstants.DEFAULT_MAX_CALLEDER_DATA_DEPTH, e.loggerName);
}
e.throwableProxy = logStatement.throwableProxy;
e.threadName = corpusModel.getRandomThreadNameFromPool();
}
return plevoArray;
}
示例2: equals
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
public boolean equals(Object o) {
if(this == o) {
return true;
} else if(!(o instanceof LoggerContextVO)) {
return false;
} else {
KonkerLoggerContextVO that = (KonkerLoggerContextVO) o;
if(this.birthTime != that.birthTime) {
return false;
} else {
if(this.name != null) {
if(!this.name.equals(that.name)) {
return false;
}
} else if(that.name != null) {
return false;
}
if(this.propertyMap != null) {
if(!this.propertyMap.equals(that.propertyMap)) {
return false;
}
} else if(that.propertyMap != null) {
return false;
}
return true;
}
}
}
示例3: convert
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
public String convert(ILoggingEvent event) {
if (key == null) {
return "Property_HAS_NO_KEY";
} else {
LoggerContextVO lcvo = event.getLoggerContextVO();
Map<String, String> map = lcvo.getPropertyMap();
String val = map.get(key);
if (val != null) {
return val;
} else {
return System.getProperty(key);
}
}
}
示例4: LoggerContext
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
public LoggerContext() {
super();
this.loggerCache = new ConcurrentHashMap<String, Logger>();
this.loggerContextRemoteView = new LoggerContextVO(this);
this.root = new Logger(Logger.ROOT_LOGGER_NAME, null, this);
this.root.setLevel(Level.DEBUG);
loggerCache.put(Logger.ROOT_LOGGER_NAME, root);
initEvaluatorMap();
size = 1;
this.frameworkPackages = new ArrayList<String>();
}
示例5: LoggingEventWrapper
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
LoggingEventWrapper(ILoggingEvent event, Map<String, String> mdcPropertyMap) {
this.event = event;
this.mdcPropertyMap = mdcPropertyMap;
final LoggerContextVO oldVo = event.getLoggerContextVO();
if (oldVo != null) {
vo = new LoggerContextVO(oldVo.getName(), mdcPropertyMap, oldVo.getBirthTime());
} else {
vo = null;
}
}
示例6: setLogbackProperty
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
private void setLogbackProperty(
final ILoggingEvent mockEvent,
final String propertyKey,
final String propertyValue) {
LoggerContextVO mockContext = mock(LoggerContextVO.class);
Map<String, String> mockPropertiesMap = new HashMap<String, String>();
mockPropertiesMap.put(propertyKey, propertyValue);
when(mockEvent.getLoggerContextVO()).thenReturn(mockContext);
when(mockContext.getPropertyMap()).thenReturn(mockPropertiesMap);
}
示例7: getLoggerContextVO
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
@Override
public LoggerContextVO getLoggerContextVO() {
return event.getLoggerContextVO();
}
示例8: getLoggerContextVO
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
@Override
public LoggerContextVO getLoggerContextVO() {
return this.event.getLoggerContextVO();
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:LevelRemappingAppender.java
示例9: getLoggerContextVO
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
@Override
public LoggerContextVO getLoggerContextVO() {
return loggingEvent.getLoggerContextVO();
}
示例10: getLoggerContextRemoteView
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
public LoggerContextVO getLoggerContextRemoteView() {
return loggerContextRemoteView;
}
示例11: getRandomlyNamedLoggerContextVO
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
LoggerContextVO getRandomlyNamedLoggerContextVO() {
LoggerContext lc = new LoggerContext();
lc.setName(getRandomJavaIdentifier());
return new LoggerContextVO(lc);
}
示例12: createEvent
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
private ILoggingEvent createEvent(String message) {
return new ILoggingEvent() {
@Override
public void prepareForDeferredProcessing() {
// Do nothing
}
@Override
public boolean hasCallerData() {
return false;
}
@Override
public long getTimeStamp() {
return 0;
}
@Override
public IThrowableProxy getThrowableProxy() {
return null;
}
@Override
public String getThreadName() {
return "test";
}
@Override
public String getMessage() {
return message;
}
@Override
public Map<String, String> getMdc() {
return Collections.emptyMap();
}
@Override
public Marker getMarker() {
return null;
}
@Override
public Map<String, String> getMDCPropertyMap() {
return Collections.emptyMap();
}
@Override
public String getLoggerName() {
return "fake";
}
@Override
public LoggerContextVO getLoggerContextVO() {
return null;
}
@Override
public Level getLevel() {
return Level.INFO;
}
@Override
public String getFormattedMessage() {
return message;
}
@Override
public StackTraceElement[] getCallerData() {
return new StackTraceElement[0];
}
@Override
public Object[] getArgumentArray() {
return new Object[0];
}
};
}
示例13: getLoggerContextVO
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
@Override
public LoggerContextVO getLoggerContextVO() {
return this.event.getLoggerContextVO();
}
示例14: getLoggerContextVO
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
@Override
public LoggerContextVO getLoggerContextVO() {
return null;
}
示例15: getLoggerContextVO
import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
@Override
public LoggerContextVO getLoggerContextVO() {
return vo;
}