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


Java UnsynchronizedAppenderBase类代码示例

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


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

示例1: addDefaultNestedComponentRegistryRules

import ch.qos.logback.core.UnsynchronizedAppenderBase; //导入依赖的package包/类
static public void addDefaultNestedComponentRegistryRules(
    DefaultNestedComponentRegistry registry) {
  registry.add(AppenderBase.class, "layout", PatternLayout.class);
  registry.add(UnsynchronizedAppenderBase.class, "layout", PatternLayout.class);
  
  registry.add(AppenderBase.class, "encoder", PatternLayoutEncoder.class);
  registry.add(UnsynchronizedAppenderBase.class, "encoder", PatternLayoutEncoder.class);
  
  registry
      .add(EvaluatorFilter.class, "evaluator", JaninoEventEvaluator.class);

  SSLNestedComponentRegistryRules.addDefaultNestedComponentRegistryRules(registry);
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:14,代码来源:DefaultNestedComponentRules.java

示例2: addDefaultNestedComponentRegistryRules

import ch.qos.logback.core.UnsynchronizedAppenderBase; //导入依赖的package包/类
@Override
protected void addDefaultNestedComponentRegistryRules(
    DefaultNestedComponentRegistry registry) {
  registry.add(AppenderBase.class, "layout", PatternLayout.class);
        registry
      .add(EvaluatorFilter.class, "evaluator", JaninoEventEvaluator.class);

  registry.add(AppenderBase.class, "encoder", PatternLayoutEncoder.class);
  registry.add(UnsynchronizedAppenderBase.class, "encoder", PatternLayoutEncoder.class);
  SSLNestedComponentRegistryRules.addDefaultNestedComponentRegistryRules(registry);
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:12,代码来源:JoranConfigurator.java

示例3: addHandler

import ch.qos.logback.core.UnsynchronizedAppenderBase; //导入依赖的package包/类
@Before
public void addHandler() throws Exception
{
    mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);

    serializedEvents.clear();

    final OnConsoleStatusListener listener = new OnConsoleStatusListener();
    listener.start();
    context.getStatusManager().add(listener);

    final JsonLogEncoder encoder = new JsonLogEncoder() {
        @Override
        public ObjectNode convertToObjectNode(ILoggingEvent event) {
            ObjectNode node = super.convertToObjectNode(event);
            serializedEvents.add(node);
            return node;
        }
    };
    encoder.setContext(context);

    final UnsynchronizedAppenderBase<ILoggingEvent> captureAppender = new UnsynchronizedAppenderBase<ILoggingEvent>() {
        @Override
        protected void append(ILoggingEvent eventObject) {
            encoder.encode(eventObject);
        }
    };
    captureAppender.setContext(context);
    captureAppender.start();

    context.getLogger(Logger.ROOT_LOGGER_NAME).addAppender(captureAppender);
    new BasicConfigurator().configure(context);
    context.start();
}
 
开发者ID:opentable,项目名称:otj-logging,代码行数:35,代码来源:LogMetadataTest.java

示例4: buildAppender

import ch.qos.logback.core.UnsynchronizedAppenderBase; //导入依赖的package包/类
private <T extends UnsynchronizedAppenderBase<ILoggingEvent>> T buildAppender(T appender, AppenderType type, boolean start) {
    appender.setName(type.getId());

    this.appenders.put(type, appender);

    return this.buildLifeCycle(appender, start);
}
 
开发者ID:esacinc,项目名称:sdcct,代码行数:8,代码来源:LoggingInitializerRunListener.java


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