You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Frederick E Niemi (JIRA)" <ji...@apache.org> on 2015/03/23 14:51:10 UTC
[jira] [Created] (LOG4J2-983) Xinclude XML Configuration if include
XML file has both appenders and loggers
Frederick E Niemi created LOG4J2-983:
----------------------------------------
Summary: Xinclude XML Configuration if include XML file has both appenders and loggers
Key: LOG4J2-983
URL: https://issues.apache.org/jira/browse/LOG4J2-983
Project: Log4j 2
Issue Type: Bug
Components: Core
Affects Versions: 2.2
Environment: Red Hat Enterprise Linux Server release 5.11 (Tikanga)
Windows 7 Service Pack 1
Reporter: Frederick E Niemi
Priority: Minor
If I change the log4j-xinclude-appenders.xml file to:
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<Appenders>
<Console name="STDOUT">
<PatternLayout pattern="%m%n" />
</Console>
<File name="File" fileName="${filename}" bufferedIO="false">
<PatternLayout>
<Pattern>%d %p %C{1.} [%t] %m%n</Pattern>
</PatternLayout>
</File>
<List name="List">
<Filters>
<ThresholdFilter level="error" />
</Filters>
</List>
</Appenders>
<Logger name="org.apache.logging.log4j.test3" level="debug" additivity="false">
<AppenderRef ref="File" />
</Logger>
(included a <Logger>)
I get this exception:
[Fatal Error] log4j-xinclude-appenders.xml:36:2: The markup in the document following the root element must be well-formed.
[Fatal Error] log4j-xinclude.xml:25:53: Error attempting to parse XML file (href='log4j-xinclude-appenders.xml').
ERROR StatusLogger Error parsing E:\WorkSpaces\log4j\apache-log4j-2.2-src\apache-log4j-2.2-src\log4j-core\target\test-classes\log4j-xinclude.xml org.xml.sax.SAXParseException; systemId: file:///E:/WorkSpaces/log4j/apache-log4j-2.2-src/apache-log4j-2.2-src/log4j-core/target/test-classes/log4j-xinclude.xml; lineNumber: 25; columnNumber: 53; Error attempting to parse XML file (href='log4j-xinclude-appenders.xml').
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:251)
I would like to create a base set of appenders and loggers used by several JVM's and then include a unique set of appenders and loggers.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org