You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "dedeibel (via GitHub)" <gi...@apache.org> on 2024/07/30 15:00:46 UTC

[PR] Add requiresLocation method to FileLocationPatternConverter (#2781) (logging-log4j2)

dedeibel opened a new pull request, #2782:
URL: https://github.com/apache/logging-log4j2/pull/2782

   Fix for #2781


-- 
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


Re: [PR] Add requiresLocation method to FileLocationPatternConverter (#2781) (logging-log4j2)

Posted by "vy (via GitHub)" <gi...@apache.org>.
vy commented on code in PR #2782:
URL: https://github.com/apache/logging-log4j2/pull/2782#discussion_r1703238244


##########
log4j-core-test/src/test/java/org/apache/logging/log4j/core/pattern/LocationPatternConvertersRequireLocationTest.java:
##########
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ */
+package org.apache.logging.log4j.core.pattern;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.util.List;
+
+import org.apache.logging.log4j.core.LoggerContext;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.CsvSource;
+
+public class LocationPatternConvertersRequireLocationTest {

Review Comment:
   ```suggestion
   class LocationPatternConvertersRequireLocationTest {
   ```



-- 
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


Re: [PR] Add requiresLocation method to FileLocationPatternConverter (#2781) (logging-log4j2)

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #2782:
URL: https://github.com/apache/logging-log4j2/pull/2782#issuecomment-2258906457

   
   
   <table>
       <tr>
           <th>Job</th>
           <th>Requested goals</th>
           <th>Build Tool Version</th>
           <th>Build Outcome</th>
           <th>Build ScanĀ®</th>
       </tr>
       <tr>
           <td>build-macos-latest</td>
           <td>clean install</td>
           <td align='center'>3.9.8</td>
           <td align='center'>:white_check_mark:</td>
           <td><a href="https://ge.apache.org/s/gbj3dorobier4" rel="nofollow"><img src="https://img.shields.io/badge/Build%20Scan%C2%AE-PUBLISHED-06A0CE?logo=Gradle" alt="Build Scan PUBLISHED" /></a></td>
       </tr>
       <tr>
           <td>build-ubuntu-latest</td>
           <td>clean install</td>
           <td align='center'>3.9.8</td>
           <td align='center'>:white_check_mark:</td>
           <td><a href="https://ge.apache.org/s/l5dllvai5bzo6" rel="nofollow"><img src="https://img.shields.io/badge/Build%20Scan%C2%AE-PUBLISHED-06A0CE?logo=Gradle" alt="Build Scan PUBLISHED" /></a></td>
       </tr>
       <tr>
           <td>build-windows-latest</td>
           <td>clean install</td>
           <td align='center'>3.9.8</td>
           <td align='center'>:x:</td>
           <td><a href="https://ge.apache.org/s/bwwsacshwzrbc" rel="nofollow"><img src="https://img.shields.io/badge/Build%20Scan%C2%AE-PUBLISHED-06A0CE?logo=Gradle" alt="Build Scan PUBLISHED" /></a></td>
       </tr>
   </table>
       
   
   ###### Generated by gradle/develocity-actions
   


-- 
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


Re: [PR] Add missing `FileLocationPatternConverter#requiresLocation()` (#2781) (logging-log4j2)

Posted by "vy (via GitHub)" <gi...@apache.org>.
vy merged PR #2782:
URL: https://github.com/apache/logging-log4j2/pull/2782


-- 
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


Re: [PR] Add requiresLocation method to FileLocationPatternConverter (#2781) (logging-log4j2)

Posted by "dedeibel (via GitHub)" <gi...@apache.org>.
dedeibel commented on PR #2782:
URL: https://github.com/apache/logging-log4j2/pull/2782#issuecomment-2259834173

   > @dedeibel,
   > 
   > Nice catch. Could you also add a unit test that verifies that the pattern converters `%L`, `%l`, `%F`, `%C` and `%M` implement `LocationAware` and their `requiresLocation()` method returns `true`?
   
   @ppkarwasz Thanks. I will try but please bear with me hat it might take some time to find my way around the tests.
   
   @vy Yes I will. But please give me a some time.


-- 
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


Re: [PR] Add requiresLocation method to FileLocationPatternConverter (#2781) (logging-log4j2)

Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on PR #2782:
URL: https://github.com/apache/logging-log4j2/pull/2782#issuecomment-2258876881

   @dedeibel,
   
   Nice catch. Could you also add a unit test that verifies that the pattern converters `%L`, `%l`, `%F`, `%C` and `%M` implement `LocationAware` and their `requiresLocation()` method returns `true`?


-- 
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


Re: [PR] Add requiresLocation method to FileLocationPatternConverter (#2781) (logging-log4j2)

Posted by "vy (via GitHub)" <gi...@apache.org>.
vy commented on PR #2782:
URL: https://github.com/apache/logging-log4j2/pull/2782#issuecomment-2259831673

   @dedeibel, thanks so much for the fix. Would you mind porting the fix to the `2.x` branch with the changes @ppkarwasz requested in a separate PR, please?


-- 
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


Re: [PR] Add requiresLocation method to FileLocationPatternConverter (#2781) (logging-log4j2)

Posted by "vy (via GitHub)" <gi...@apache.org>.
vy commented on PR #2782:
URL: https://github.com/apache/logging-log4j2/pull/2782#issuecomment-2259897569

   @dedeibel, no worries, take your time. Feel free to reach out to us.
   
   Note that we'd prefer fixing `2.x` first, since Log4j 2 is heavily used and there is no Log4j 3 release date on the horizon.


-- 
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