如何关闭(禁用)jdk.event.security日志?

问题描述 投票:0回答:1

我使用spring boot应用程序,jdk版本为openjdk 11.调试级别在属性文件中处于活动状态。我不知道为什么显示jdk.event.security日志。我想关闭该日志。

 DEBUG 11007 --- [main] jdk.event.security: X509Certificate: Alg:SHA1withRSA, Serial:23456, Subject:CN=GeoTrust Global CA, O=GeoTrust Inc., C=US, Issuer:CN=GeoTrust Global CA, O=GeoTrust Inc., C=US, Key type:RSA, Length:2048, Cert Id:-2028617374, Valid from:5/21/02, 9:00 AM, Valid until:5/21/22, 8:00 AM
DEBUG 11007 --- [main] jdk.event.security: X509Certificate: Alg:SHA1withRSA, Serial:bb401c43f55e4fb0, Subject:CN=SwissSign Gold CA - G2, O=SwissSign AG, C=CH, Issuer:CN=SwissSign Gold CA - G2, O=SwissSign AG, C=CH, Key type:RSA, Length:4096, Cert Id:1516221943, Valid from:10/25/06, 1:30 PM, Valid until:10/25/36, 12:30 PM
......

 DEBUG 11007 --- [main] jdk.event.security: X509Certificate: Alg:SHA256withRSA, Serial:4a538c28, Subject:CN=Entrust Root Certification Authority - G2, OU="(c) 2009 Entrust, Inc. - for authorized use only", OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US, Issuer:CN=Entrust Root Certification Authority - G2, OU="(c) 2009 Entrust, Inc. - for authorized use only", OU=See www.entrust.net/legal-terms, O="Entrust, Inc.", C=US, Key type:RSA, Length:2048, Cert Id:1936920337, Valid from:7/7/09, 10:25 PM, Valid until:12/7/30, 9:55 PM

VM选项:

enter image description here

java security gradle logging java-11
1个回答
0
投票

我在logback-spring.xml文件中添加了这一行<logger name="jdk.event.security" level="WARN"/>。它只会显示警告消息。

© www.soinside.com 2019 - 2024. All rights reserved.