Search

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

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.