verbose:class not 使用tomcat 9和jdk11

dphi5xsq  于 2021-07-11  发布在  Java
关注(0)|答案(0)|浏览(381)

我正在使用tomcat9和oraclejdk8。对于加载类的日志记录,我喜欢使用开关 -verbose:class 它在jdk8下工作完美,但在jdk11下没有输出任何内容。
我在windows10上安装了tomcat9作为一个名为“tomcat9”的服务,所以我使用了 <Tomcat-dir>/bin/Tomcat9w.exe 用于配置。

现在,在java选项文本字段的java选项卡下,我将使用 -verbose:class 启用加载类的日志记录,这些类将显示在 <Tomcat-dir>/logs/tomcat9-stdout.x-xx-xx.log . 如果仍然在java选项卡上,我将java virtual machine字段中使用的jvm更改为java11版本,那么所提到的verbose命令将停止工作。更新的统一日志命令,如 -Xlog:class+load=info,class+unload=info 也不管用。这已经在oracle和amazon的coretto jdk11实现中进行了测试。
tomcat启动的相关部分是:

18-Nov-2020 10:29:17.311 WARNING [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property 'schema' to 'https' did not find a matching property.
18-Nov-2020 10:29:17.366 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log 
 Server Version:        Apache Tomcat/9.0.20
18-Nov-2020 10:29:17.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          May 3 2019 22:26:00 UTC
18-Nov-2020 10:29:17.367 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.20.0
18-Nov-2020 10:29:17.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 10
18-Nov-2020 10:29:17.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.0
18-Nov-2020 10:29:17.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architektur:          amd64
18-Nov-2020 10:29:17.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             C:\Program Files\Java\jdk-11
18-Nov-2020 10:29:17.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           11+28
18-Nov-2020 10:29:17.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Hersteller:            Oracle Corporation
18-Nov-2020 10:29:17.368 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log 
 CATALINA_BASE:         C:\Program Files\Apache Software Foundation\Tomcat 9.0
18-Nov-2020 10:29:17.369 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Tomcat 9.0
18-Nov-2020 10:29:17.369 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 9.0
18-Nov-2020 10:29:17.370 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 9.0
18-Nov-2020 10:29:17.370 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 9.0\temp
18-Nov-2020 10:29:17.370 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
18-Nov-2020 10:29:17.370 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\logging.properties
18-Nov-2020 10:29:17.370 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=false
18-Nov-2020 10:29:17.370 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -verbose:class
18-Nov-2020 10:29:17.370 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
18-Nov-2020 10:29:17.370 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
18-Nov-2020 10:29:17.371 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
18-Nov-2020 10:29:17.371 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit
18-Nov-2020 10:29:17.371 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: abort
18-Nov-2020 10:29:17.371 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1024m
18-Nov-2020 10:29:17.371 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024m

完全没有关于这个问题的任何信息表明,真正的问题完全存在于其他地方,我在这里提出的问题很可能是错误的。但现在,我只知道这些。如果少了什么就告诉我。
提前谢谢!

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题