當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。