rgoers commented on a change in pull request #733:
URL: https://github.com/apache/logging-log4j2/pull/733#discussion_r794225373



##########
File path: log4j-core/src/test/resources/LoggerLevelAppenderTest.properties
##########
@@ -0,0 +1,25 @@
+#
+# 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.
+#
+
+status = all
+name = LoggerLevelAppenderTest
+logger.0.name = org.apache.logging.log4j.core.config.properties
+logger.0 = INFO,first,second

Review comment:
       Matt and I only worked out how to do it for properties as that was what 
was requested. Doing it for XML could be possible, but it would be more 
difficult in YAML and JSON. I'm not even sure what the point of that would be.
   
   For XML the syntax would have to look like
   
   `<Logger name="org.apache.logging.log4j.core.config.properties" level="INFO" 
appenderRefs="first,second"/>`
   
   That is actually not "normal" for XML to have a list specified that way. And 
there would definitely be no reason to combine the level and appenderRefs into 
a single attribute.
   Also, looking at the Log4j1 DTD the xml had to be specified as 
   
   ```
     <root>
       <priority value ="trace" />
       <appender-ref ref="A1" />
       <appender-ref ref="A2" />
     </root>
   ```
   
   Note that the priority (which could also be specified as level) had to be an 
XML element whereas Log4j 2 allows it to be an element or an attribute. 
   So the bottom line is, I don't know why we would add the support to XML 
since it doesn't buy anything in the way of compatibility with Log4j 1.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to