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


Java AppenderAttachableImpl类代码示例

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


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

示例1: AsyncRequestLog

import ch.qos.logback.core.spi.AppenderAttachableImpl; //导入依赖的package包/类
public AsyncRequestLog(Clock clock,
                       AppenderAttachableImpl<ILoggingEvent> appenders,
                       final TimeZone timeZone,
                       List<String> cookies) {
    this.clock = clock;
    this.cookies = cookies;
    this.queue = new LinkedBlockingQueue<String>();
    this.dispatcher = new Dispatcher();
    this.dispatchThread = new Thread(dispatcher);
    dispatchThread.setName("async-request-log-dispatcher-" + THREAD_COUNTER.incrementAndGet());
    dispatchThread.setDaemon(true);

    this.dateCache = new ThreadLocal<DateCache>() {
        @Override
        protected DateCache initialValue() {
            final DateCache cache = new DateCache("dd/MMM/yyyy:HH:mm:ss Z", Locale.US);
            cache.setTimeZoneID(timeZone.getID());
            return cache;
        }
    };

    this.appenders = appenders;
}
 
开发者ID:wotifgroup,项目名称:grails-lightweight-deploy,代码行数:24,代码来源:AsyncRequestLog.java

示例2: configure

import ch.qos.logback.core.spi.AppenderAttachableImpl; //导入依赖的package包/类
public Handler configure() {

        final Logger logger = (Logger) LoggerFactory.getLogger("http.request");
        logger.setAdditive(false);

        final LoggerContext context = logger.getLoggerContext();

        final AppenderAttachableImpl<ILoggingEvent> appenders = new AppenderAttachableImpl<ILoggingEvent>();

        final RequestLogLayout layout = new RequestLogLayout();
        layout.start();

        for (OutputStreamAppender<ILoggingEvent> appender : LogbackFactory.buildAppenders(config.getRequestLogConfiguration(),
                context)) {
            appender.stop();
            appender.setLayout(layout);
            appender.start();
            appenders.addAppender(appender);
        }

        final RequestLogHandler handler = new RequestLogHandler();
        handler.setRequestLog(new AsyncRequestLog(Clock.defaultClock(),
                appenders,
                config.getRequestLogConfiguration().getTimeZone(),
                config.getRequestLogConfiguration().getCookies()));

        return handler;

    }
 
开发者ID:wotifgroup,项目名称:grails-lightweight-deploy,代码行数:30,代码来源:RequestLoggingFactory.java

示例3: addAppender

import ch.qos.logback.core.spi.AppenderAttachableImpl; //导入依赖的package包/类
public synchronized void addAppender(Appender<ILoggingEvent> newAppender) {
    if(this.aai == null) {
        this.aai = new AppenderAttachableImpl();
    }

    this.aai.addAppender(newAppender);
}
 
开发者ID:KonkerLabs,项目名称:konker-platform,代码行数:8,代码来源:KonkerLogger.java

示例4: addAppender

import ch.qos.logback.core.spi.AppenderAttachableImpl; //导入依赖的package包/类
public synchronized void addAppender(Appender<ILoggingEvent> newAppender) {
  if (aai == null) {
    aai = new AppenderAttachableImpl<ILoggingEvent>();
  }
  aai.addAppender(newAppender);
}
 
开发者ID:cscfa,项目名称:bartleby,代码行数:7,代码来源:Logger.java


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