本文整理了Java中org.apache.logging.log4j.core.config.Configuration.createConfiguration()
方法的一些代码示例,展示了Configuration.createConfiguration()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.createConfiguration()
方法的具体详情如下:
包路径:org.apache.logging.log4j.core.config.Configuration
类名称:Configuration
方法名:createConfiguration
暂无
代码示例来源:origin: apache/hive
for (final Node cnode : node.getChildren()) {
final Node appNode = new Node(cnode);
config.createConfiguration(appNode, event);
if (appNode.getObject() instanceof Appender) {
final Appender app = appNode.getObject();
代码示例来源:origin: org.apache.hive/hive-llap-server
for (final Node cnode : node.getChildren()) {
final Node appNode = new Node(cnode);
config.createConfiguration(appNode, event);
if (appNode.getObject() instanceof Appender) {
final Appender app = appNode.getObject();
代码示例来源:origin: ops4j/org.ops4j.pax.logging
public Appender createAppender(final String appenderName, final String actualName) {
final Node node = nodeMap.get(appenderName);
if (node == null) {
LOGGER.error("No node named {} in {}", appenderName, this);
return null;
}
node.getAttributes().put("name", actualName);
if (node.getType().getElementName().equals(Appender.ELEMENT_TYPE)) {
final Node appNode = new Node(node);
configuration.createConfiguration(appNode, null);
if (appNode.getObject() instanceof Appender) {
final Appender app = appNode.getObject();
app.start();
return app;
}
LOGGER.error("Unable to create Appender of type " + node.getName());
return null;
}
LOGGER.error("No Appender was configured for name {} " + appenderName);
return null;
}
}
代码示例来源:origin: ops4j/org.ops4j.pax.logging
private Appender createAppender(final Route route, final LogEvent event) {
final Node routeNode = route.getNode();
for (final Node node : routeNode.getChildren()) {
if (node.getType().getElementName().equals(Appender.ELEMENT_TYPE)) {
final Node appNode = new Node(node);
configuration.createConfiguration(appNode, event);
if (appNode.getObject() instanceof Appender) {
final Appender app = appNode.getObject();
app.start();
return app;
}
error("Unable to create Appender of type " + node.getName());
return null;
}
}
error("No Appender was configured for route " + route.getKey());
return null;
}
内容来源于网络,如有侵权,请联系作者删除!