本文整理汇总了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());
}
示例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();
}
});
}
示例3: newInstance
import org.jboss.netty.logging.InternalLogger; //导入依赖的package包/类
@Override
public InternalLogger newInstance(String name) {
return new DubboLogger(LoggerFactory.getLogger(name));
}
示例4: newInstance
import org.jboss.netty.logging.InternalLogger; //导入依赖的package包/类
@Override
public InternalLogger newInstance(String name) {
return new NettyInternalESLogger(Loggers.getLogger(name));
}
示例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."));
}