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


Java InternalLogger类代码示例

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


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

示例1: setupLogger

import org.jboss.netty.logging.InternalLogger; //导入依赖的package包/类
public static void setupLogger(Config config) throws IOException {

        Layout layout = new PatternLayout("%d{" + DATE_FORMAT + "} %5p: %m%n");

        Appender appender = new DailyRollingFileAppender(
                layout, config.getString("logger.file"), "'.'yyyyMMdd");

        LogManager.resetConfiguration();
        LogManager.getRootLogger().addAppender(new NullAppender());

        logger = Logger.getLogger(LOGGER_NAME);
        logger.addAppender(appender);
        logger.setLevel(Level.toLevel(config.getString("logger.level"), Level.ALL));

        // Workaround for "Bug 745866 - (EDG-45) Possible netty logging config problem"
        InternalLoggerFactory.setDefaultFactory(new InternalLoggerFactory() {
            @Override
            public InternalLogger newInstance(String string) {
                return new NettyInternalLogger();
            }
        });

        Log.logSystemInfo();
        Log.info("Version: " + getAppVersion());
    }
 
开发者ID:bamartinezd,项目名称:traccar-service,代码行数:26,代码来源:Log.java

示例2: setupLogger

import org.jboss.netty.logging.InternalLogger; //导入依赖的package包/类
public static void setupLogger(Properties properties) throws IOException {

        Layout layout = new PatternLayout("%d{yyyy-MM-dd HH:mm:ss} %5p: %m%n");

        Appender appender = new DailyRollingFileAppender(
                layout, properties.getProperty("logger.file"), "'.'yyyyMMdd");

        LogManager.resetConfiguration();
        logger = Logger.getLogger(LOGGER_NAME);
        logger.addAppender(appender);
        logger.setLevel(Level.ALL);

        // Workaround for "Bug 745866 - (EDG-45) Possible netty logging config problem"
        InternalLoggerFactory.setDefaultFactory(new InternalLoggerFactory() {
            @Override
            public InternalLogger newInstance(String string) {
                return new NettyInternalLogger();
            }
        });
    }
 
开发者ID:michaelloliveira,项目名称:traccar-mongodb,代码行数:21,代码来源:Log.java

示例3: newInstance

import org.jboss.netty.logging.InternalLogger; //导入依赖的package包/类
@Override
public InternalLogger newInstance(String name) {
    return new DubboLogger(LoggerFactory.getLogger(name));
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:5,代码来源:NettyHelper.java

示例4: newInstance

import org.jboss.netty.logging.InternalLogger; //导入依赖的package包/类
@Override
public InternalLogger newInstance(String name) {
    return new NettyInternalESLogger(Loggers.getLogger(name));
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:5,代码来源:NettyInternalESLoggerFactory.java

示例5: newInstance

import org.jboss.netty.logging.InternalLogger; //导入依赖的package包/类
@Override
public InternalLogger newInstance(String name) {
    return super.newInstance(name.replace("org.jboss.netty.", "netty.").replace("org.jboss.netty.", "netty."));
}
 
开发者ID:baidu,项目名称:Elasticsearch,代码行数:5,代码来源:NettyUtils.java


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