You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (JIRA)" <ji...@apache.org> on 2019/01/30 23:38:00 UTC

[jira] [Commented] (LOG4J2-2537) Log4j 2 Performance issue with Java 11

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

Ralph Goers commented on LOG4J2-2537:
-------------------------------------

If you are getting this message then your application is not setup to use multi-release jars. Log4j supports Java 9+ by using Stackwalker in a version of StackLocator that is located in META-INF/versions/9. Depending on how your application works, you may need to have Multi-Release set to true in the jar manifest. This is true for Spring Boot jars. Without multi-release support you will use the pre-Java 9 version of StackLocator which tries to use Reflection.getCallerClass(). That class was removed in Java 9. Log4j will fall back to a slower way to calculate stack locations but it will still work. Hence the warning.

> Log4j 2 Performance issue with Java 11
> --------------------------------------
>
>                 Key: LOG4J2-2537
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2537
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 2.11.0
>            Reporter: Suraj Menon
>            Priority: Minor
>
> Log4j shows the following warning when running with Java 11. No such warnings were shown when running with Java 8.
> {noformat}
> WARNING: sun.reflect.Reflection.getCallerClass is not supported. This will impact performance.{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)