3.9. Software Collection Log File Support
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”.