Show Table of Contents
14.5.4. 指定应用程序里的日志配置集
应用程序在
MANIFEST.MF 文件里指定要使用的日志配置集。
预备条件:
- 您必须知道服务器上为这个应用程序设置的日志配置集的名称,您可以咨询服务器管理员要使用的配置集名称。
过程 14.6. 添加日志配置集到应用程序里
编辑
MANIFEST.MF如果您的应用程序没有MANIFEST.MF文件:用下列内容创建一个,用配置集名替换NAME。Manifest-Version: 1.0 Logging-Profile: NAME
如果您的应用程序已经有了MANIFEST.MF文件:添加下列行,用配置集名替换NAME。Logging-Profile: NAME
注意
如果您在使用 Maven 和
maven-war-plugin,您可以将 MANIFEST.MF 文件置于 src/main/resources/META-INF/ 并添加下列配置到 pom.xml 文件里。
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
当应用程序被部署时,它会对日志消息使用指定日志配置集里的配置。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.