logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Remko Popma (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LOG4J2-1359) Add support for Java 9 StackWalker API in ReflectionUtil
Date Sat, 11 Mar 2017 14:10:04 GMT

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

Remko Popma edited comment on LOG4J2-1359 at 3/11/17 2:09 PM:
--------------------------------------------------------------

Is it possible to compile only one class with Java 9 and the rest with Java 7? Maybe have
a module with Java 9-only functionality?

We currently delay walking the stack until we need to. Can we do something similar with capturing
the stack? That is, only capture it when a) we're logging synchronously and one of the pattern
converters asks for the caller location, or b) we're logging asynchronously and we're configured
to capture a stack snapshot before handing over the log event details to the background thread?


I don't understand what the openjdk devs are suggesting concretely. Can you give an example,
or point me to something (a specific API, or an example, or an email) that would clarify?


was (Author: remkop@yahoo.com):
Is it possible to compile only one class with Java 9 and the rest with Java 7? Maybe have
a module with Java 9-only functionality?

We currently delay walking the stack until we need to. Can we do something similar with capturing
the stack? That is, only capture it when a) we're logging synchronously and one of the pattern
converters asks for the caller location, or b) we're logging asynchronously and we're configured
to capture a stack snapshot before handing over the log event details to the background thread?


I don't understand what the openjdk devs are suggesting concretely. Can you point me to something
(a specific API, or an example, or an email) that would clarify?

> 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


Mime
View raw message