Bài viết phổ biến của tác giả
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图告诉 Websphere Liberty 我的 log4j2.xml
文件在哪里,但它不起作用。
在我的文件 jvm.options
中,我配置:
-Dlog4j.configurationFile=file:///${server.config.dir}/log4j2.xml
但看起来 Liberty 不理解 jvm.options 文件中的变量 ${server.config.dir}。该文件与 server.xml
文件位于同一目录中。
如何为 Liberty 指定 log4j2.xml 位置?
1 Câu trả lời
我认为应该可以通过在 server.xml 中创建一个库条目来实现,例如:
指定的目录包含 log4j2 属性或 xml 文件。
然后像这样为您的应用程序指定一个类加载器:
关于log4j2 - Websphere 自由 : How to specify log4j2 configuration location?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55858059/
Tôi là một lập trình viên xuất sắc, rất giỏi!