开发者

java.util.logging.config

开发者 https://www.devze.com 2022-12-13 06:10 出处:网络
Is there a way to set the location of the properties file withough specifying 开发者_运维知识库a JVM param such as -Djava.util.logging.config.file=log.properties ?Yes. Per the documentation, you can c

Is there a way to set the location of the properties file withough specifying 开发者_运维知识库a JVM param such as -Djava.util.logging.config.file=log.properties ?


Yes. Per the documentation, you can configure the LogManager via the Preferences API.

InputStream inputStream = new FileInputStream("logging.properties");
LogManager.getLogManager().readConfiguration(inputStream);
0

精彩评论

暂无评论...
验证码 换一张
取 消