[
https://issues.apache.org/jira/browse/LOG4J2-809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14123460#comment-14123460
]
Matt Sicker commented on LOG4J2-809:
------------------------------------
The part I'm working on right now is the fallback version that uses a Throwable
stack trace. I've got an equivalent version that behaves the same as the
internal API when run on OpenJDK, but I still need to find out what packages or
class names to expect in alternative JVMs that are equivalent to the
{{sun.reflect}} classes (which all get ignored in the stack frame walk). It's
too bad the function {{JVM_GetCallerClass(JNIEnv* env, int depth)}} in
{{jvm.h}} is probably not part of the standard JNI functionality, or else we
could just bundle a native alternative.
> Move caller class reflection utils to API
> -----------------------------------------
>
> Key: LOG4J2-809
> URL: https://issues.apache.org/jira/browse/LOG4J2-809
> Project: Log4j 2
> Issue Type: Task
> Components: API
> Affects Versions: 2.1
> Reporter: Matt Sicker
> Assignee: Matt Sicker
>
> In particular, ReflectiveCallerClassUtility should be moved into the API
> inside the util package. This will provide a nice alternative for making a
> new Throwable each time.
> For an idea on why this can be useful, run the ReflectionBenchmark in
> log4j-perf and note the differences. It's rather significant.
> Since this would go in the util package, it would be a non-public API. It
> would make sense for some very, very common utility classes like this to be
> in there.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]