You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2022/01/04 16:38:44 UTC

[GitHub] [logging-log4j2] benjaminr-ps opened a new pull request #680: Use specific filter key as prefix while parsing configuration

benjaminr-ps opened a new pull request #680:
URL: https://github.com/apache/logging-log4j2/pull/680


   Problem: The log4j 1.x configuration file is not properly parsed, in regards of filters. Whatever is configured in file, is getting ignored, and default values are used. 
   E.g. for "level range filter" the LevelMax is not properly found (eventhough properly read as property).
   
   Root cause: The default filter prefix is used, instead of specific filter key.


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [logging-log4j2] garydgregory commented on pull request #680: [LOG4J2-3326] Fix parsing filters from Log4j 1.2 properties configuration file

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #680:
URL: https://github.com/apache/logging-log4j2/pull/680#issuecomment-1008857707


   https://issues.apache.org/jira/browse/LOG4J2-3326
   


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [logging-log4j2] garydgregory edited a comment on pull request #680: [LOG4J2-3326] Fix parsing filters from Log4j 1.2 properties configuration file

Posted by GitBox <gi...@apache.org>.
garydgregory edited a comment on pull request #680:
URL: https://github.com/apache/logging-log4j2/pull/680#issuecomment-1007372996


   Hi @benjaminr-ps 
   
   Thank you for your PR. Would you add a test, please? 
   
   Without a test, there is no way to see that this fixes anything or that undoing the fix would break anything (a regression).
   
   See PropertiesConfigurationTest for an example.
   TY!


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [logging-log4j2] garydgregory commented on pull request #680: [LOG4J2-3326] Fix parsing filters from Log4j 1.2 properties configuration file

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #680:
URL: https://github.com/apache/logging-log4j2/pull/680#issuecomment-1007372996


   Hi @benjaminr-ps 
   
   Thank you for your PR. Would you add a test please? 
   
   Without a test there is no way to see that this fixes anything or that the undoing the fix would break anything (a regression).
   
   See PropertiesConfigurationTest for an example.
   TY!


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [logging-log4j2] garydgregory commented on a change in pull request #680: [LOG4J2-3326] Fix parsing filters from Log4j 1.2 properties configuration file

Posted by GitBox <gi...@apache.org>.
garydgregory commented on a change in pull request #680:
URL: https://github.com/apache/logging-log4j2/pull/680#discussion_r781176438



##########
File path: log4j-1.2-api/src/test/resources/LOG4J2-3326.properties
##########
@@ -0,0 +1,22 @@
+# 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.
+
+
+log4j.appender.CUSTOM=org.apache.log4j.CustomNoopAppender
+log4j.appender.CUSTOM.filter.1=org.apache.log4j.varia.LevelRangeFilter
+log4j.appender.CUSTOM.filter.1.levelMin=ALL
+log4j.appender.CUSTOM.filter.2=org.apache.log4j.varia.LevelRangeFilter
+
+log4j.rootLogger=trace, CUSTOM

Review comment:
       In future PRs, please end files with an EOL.
   




-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [logging-log4j2] garydgregory commented on pull request #680: [LOG4J2-3326] Fix parsing filters from Log4j 1.2 properties configuration file

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #680:
URL: https://github.com/apache/logging-log4j2/pull/680#issuecomment-1007372996


   Hi @benjaminr-ps 
   
   Thank you for your PR. Would you add a test please? 
   
   Without a test there is no way to see that this fixes anything or that the undoing the fix would break anything (a regression).
   
   See PropertiesConfigurationTest for an example.
   TY!


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [logging-log4j2] garydgregory merged pull request #680: [LOG4J2-3326] Fix parsing filters from Log4j 1.2 properties configuration file

Posted by GitBox <gi...@apache.org>.
garydgregory merged pull request #680:
URL: https://github.com/apache/logging-log4j2/pull/680


   


-- 
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: notifications-unsubscribe@logging.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org