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 "Ralph Goers (JIRA)" <ji...@apache.org> on 2017/03/11 13:00:05 UTC

[jira] [Comment Edited] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil

    [ https://issues.apache.org/jira/browse/LOG4J2-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15906196#comment-15906196 ] 

Ralph Goers edited comment on LOG4J2-1359 at 3/11/17 12:59 PM:
---------------------------------------------------------------

I need to get back to this...

Java 9 provides multi-version support - we can provide one version of a class for pre-java9 and another for java9, but it requires the build be done with java 9, which I am reluctant to do.

Also, the openjdk devs recommend that the stack frame of the caller be captured, not walking the stack as we do now. But that would be a huge change and could negatively impact the performance of every logging call even if logging is disabled.


was (Author: ralph.goers@dslextreme.com):
I need to get back to this...

Java 9 provides multi-version support - we can provide one version of a class for pre-java9 and another for java9, but it requires the build be done with java 9, which I am reluctant to do.

> Add support for Java 9 StackWalker API in ReflectionUtil
> --------------------------------------------------------
>
>                 Key: LOG4J2-1359
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1359
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: API
>         Environment: Java 1.9+
>            Reporter: Matt Sicker
>            Assignee: Ralph Goers
>              Labels: jdk9
>
> [StackWalker|http://download.java.net/jdk9/docs/api/java/lang/StackWalker.html]
> Based on the functional nature of this API, supporting it may require compiling at least one class using javac 1.9 and reflectively loading it in ReflectionUtil similar to how Spring supports newer JDK APIs.
> Without support for StackWalker, ReflectionUtil will fall back to using a slower API in Java 1.9. This is because the Reflection class is a sun-internal class which are no longer exported to non-JDK code without setting special command line flags.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org