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


Java LoggerContextVO类代码示例

本文整理汇总了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;
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:27,代码来源:Corpus.java

示例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;
        }
    }
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:31,代码来源:KonkerLoggerContextVO.java

示例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);
    }
  }
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:15,代码来源:PropertyConverter.java

示例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>();
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:13,代码来源:LoggerContext.java

示例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;
    }
}
 
开发者ID:line,项目名称:armeria,代码行数:12,代码来源:RequestContextExportingAppender.java

示例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);
}
 
开发者ID:Tuxdude,项目名称:logback-colorizer,代码行数:11,代码来源:TestLogColorizer.java

示例7: getLoggerContextVO

import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
@Override
public LoggerContextVO getLoggerContextVO() {
    return event.getLoggerContextVO();
}
 
开发者ID:line,项目名称:centraldogma,代码行数:5,代码来源:ExpectedExceptionAppender.java

示例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();
}
 
开发者ID:nince-wyj,项目名称:jahhan,代码行数:5,代码来源:JahhanLoggingEvent.java

示例10: getLoggerContextRemoteView

import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
public LoggerContextVO getLoggerContextRemoteView() {
  return loggerContextRemoteView;
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:4,代码来源:LoggerContext.java

示例11: getRandomlyNamedLoggerContextVO

import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
LoggerContextVO getRandomlyNamedLoggerContextVO() {
  LoggerContext lc = new LoggerContext();
  lc.setName(getRandomJavaIdentifier());
  return new LoggerContextVO(lc);
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:6,代码来源:CorpusModel.java

示例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];
		}
	};
}
 
开发者ID:dstl,项目名称:baleen,代码行数:80,代码来源:LoggingServletTest.java

示例13: getLoggerContextVO

import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
@Override
public LoggerContextVO getLoggerContextVO() {
    return this.event.getLoggerContextVO();
}
 
开发者ID:skinny-framework,项目名称:skinny-logback,代码行数:5,代码来源:LevelRemappingAppender.java

示例14: getLoggerContextVO

import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
@Override
public LoggerContextVO getLoggerContextVO() {
  return null;
}
 
开发者ID:mqlight,项目名称:java-mqlight,代码行数:5,代码来源:MockILoggingEvent.java

示例15: getLoggerContextVO

import ch.qos.logback.classic.spi.LoggerContextVO; //导入依赖的package包/类
@Override
public LoggerContextVO getLoggerContextVO() {
    return vo;
}
 
开发者ID:line,项目名称:armeria,代码行数:5,代码来源:RequestContextExportingAppender.java


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