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 2021/10/02 14:04:02 UTC

[GitHub] [logging-log4j2] Dretch opened a new pull request #585: LOG4J2-3170 Make EncodingPatternConverter CRLF/HTML encoding run in O(n) time, worst-case, rather than O(n ^ 2)

Dretch opened a new pull request #585:
URL: https://github.com/apache/logging-log4j2/pull/585


   This fixes https://issues.apache.org/jira/browse/LOG4J2-3170
   
   PS. Although this the passes tests that seem relevant, I could not get the entire project to build. I could not find a build of JDK 9 for Mac that has the `sun.reflect.Reflection` class (which was [apparently](https://stackoverflow.com/a/42187227/2282010) added only in later versions of JDK 9). 


-- 
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] Dretch commented on pull request #585: LOG4J2-3170 Make EncodingPatternConverter CRLF/HTML encoding run in O(n) time, worst-case, rather than O(n ^ 2)

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


   @vy that works -- thanks!


-- 
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] Dretch commented on pull request #585: LOG4J2-3170 Make EncodingPatternConverter CRLF/HTML encoding run in O(n) time, worst-case, rather than O(n ^ 2)

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


   @vy that works -- thanks!


-- 
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] carterkozak commented on pull request #585: LOG4J2-3170 Make EncodingPatternConverter CRLF/HTML encoding run in O(n) time, worst-case, rather than O(n ^ 2)

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


   I think you need both installed, and also to `export JAVA_HOME=/path/to/jdk8home`


-- 
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] vy commented on pull request #585: LOG4J2-3170 Make EncodingPatternConverter CRLF/HTML encoding run in O(n) time, worst-case, rather than O(n ^ 2)

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


   Thanks so much @Dretch! Ported the changes to `master` as well.


-- 
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] vy commented on pull request #585: LOG4J2-3170 Make EncodingPatternConverter CRLF/HTML encoding run in O(n) time, worst-case, rather than O(n ^ 2)

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


   @Dretch, for the records, you need to have two JDKs available in your system to be able to compile `release-2.x`:
   
   1. Java 8
   1. Java 9+ (11, etc. is okay too)
   
   Then you pass these compilers to Maven using `~/.m2/toolchains.xml`:
   
   ```xml
   $ cat ~/.m2/toolchains.xml 
   <?xml version="1.0" encoding="UTF8"?>
   <toolchains xmlns="http://maven.apache.org/TOOLCHAINS/1.1.0"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://maven.apache.org/TOOLCHAINS/1.1.0 http://maven.apache.org/xsd/toolchains-1.1.0.xsd">
   
     <toolchain>
       <type>jdk</type>
       <provides>
         <id>java8</id>
         <version>1.8</version>
         <vendor>sun</vendor>
       </provides>
       <configuration>
         <jdkHome>/home/vy/.sdkman/candidates/java/8.0.292.hs-adpt</jdkHome>
       </configuration>
     </toolchain>
   
     <toolchain>
       <type>jdk</type>
       <provides>
         <id>java11</id>
         <version>11</version>
         <vendor>sun</vendor>
       </provides>
       <configuration>
         <jdkHome>/home/vy/.sdkman/candidates/java/11.0.11.hs-adpt</jdkHome>
       </configuration>
     </toolchain>
   
   </toolchains>
   ```
   
   Let me know if you still can't compile.


-- 
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] Dretch commented on pull request #585: LOG4J2-3170 Make EncodingPatternConverter CRLF/HTML encoding run in O(n) time, worst-case, rather than O(n ^ 2)

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


   Thanks @vy , I had not tried the combination of JDK 8 and JDK 11 before.
   
   However, this still has the issue with `sun.reflect.Reflection` not being there:
   
   My `~/.m2/toolchains.xml`:
   ``` xml
   <?xml version="1.0" encoding="UTF8"?>
   <toolchains>
     <toolchain>
       <type>jdk</type>
       <provides>
         <version>8</version>
         <vendor>sun</vendor>
       </provides>
       <configuration>
         <jdkHome>/Users/garethsmith/.sdkman/candidates/java/8.0.292.j9-adpt</jdkHome>
       </configuration>
     </toolchain>
     <toolchain>
       <type>jdk</type>
       <provides>
         <version>11</version>
         <vendor>sun</vendor>
       </provides>
       <configuration>
         <jdkHome>/Users/garethsmith/.sdkman/candidates/java/11.0.6.hs-adpt</jdkHome>
       </configuration>
     </toolchain>
   </toolchains>
   ```
   
   `mvn clean install` error message:
   ```
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  18.275 s
   [INFO] Finished at: 2021-10-04T09:04:03+01:00
   [INFO] ------------------------------------------------------------------------
   [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project log4j-api: Compilation failure
   [ERROR] /Users/garethsmith/projects/github-apache/logging-log4j2/log4j-api/src/test/java/org/apache/logging/log4j/util/StackLocatorUtilTest.java:[25,18] error: cannot find symbol
   [ERROR]   symbol:   class Reflection
   [ERROR]   location: package sun.reflect
   [ERROR] 
   [ERROR] -> [Help 1]
   [ERROR] 
   [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
   [ERROR] Re-run Maven using the -X switch to enable full debug logging.
   [ERROR] 
   [ERROR] For more information about the errors and possible solutions, please read the following articles:
   [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
   [ERROR] 
   [ERROR] After correcting the problems, you can resume the build with the command
   [ERROR]   mvn <args> -rf :log4j-api
   ```


-- 
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] vy commented on pull request #585: LOG4J2-3170 Make EncodingPatternConverter CRLF/HTML encoding run in O(n) time, worst-case, rather than O(n ^ 2)

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


   @Dretch, mind trying the following, please?
   
   1. Switch to Java 8
   1. Run `./mvnw clean package -DskipTests=true` in `release-2.x` branch.
   
   Note that `mvnw` needs to be run with Java 8; your `toolchains.xml` looks good.


-- 
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] vy merged pull request #585: LOG4J2-3170 Make EncodingPatternConverter CRLF/HTML encoding run in O(n) time, worst-case, rather than O(n ^ 2)

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


   


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