搜索

此内容没有您所选择的语言版本。

3.9. Software Collection Log File Support

download PDF
By default, programs packaged in a Software Collection create log files in the /opt/provider/%{scl}/root/var/log/ directory.
To make log files more accessible and easier to manage, you are advised to use the nfsmountable macro that redefines the _localstatedir macro. This results in log files being created underneath the /var/opt/provider/%{scl}/log/ directory, outside of the /opt/provider/%{scl} file system hierarchy.
For example, a service mydaemon normally stores its log file in /var/log/mydaemon/mydaemond.log in the base system installation. When mydaemon is packaged as a software_collection Software Collection and the nfsmountable macro is defined, the path to the log file in software_collection is as follows:
/var/opt/provider/software_collection/log/mydaemon/mydaemond.log
For more information on using the nfsmountable macro, see Section 3.1, “Using Software Collections over NFS”.
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.