From Fedora Project Wiki
(Created page with "== Fedora Log Files == This document describes the guidelines for log files, for use and inclusion in Fedora packages. == Log Files on the filesystem == Packages with Log files...") |
|||
Line 4: | Line 4: | ||
== Log Files on the filesystem == | == Log Files on the filesystem == | ||
Packages with | Packages with log files must reside in their own directory under /var/log and must be named /var/log/$package_name | ||
Each log file in that directory must end with .log filename. | Each log file in that directory must end with .log filename. | ||
Revision as of 10:03, 23 February 2012
Fedora Log Files
This document describes the guidelines for log files, for use and inclusion in Fedora packages.
Log Files on the filesystem
Packages with log files must reside in their own directory under /var/log and must be named /var/log/$package_name Each log file in that directory must end with .log filename.
Log Files Packaging
Name: ..... Source1: %{name}.logrotate Requires: logrotate %install ... mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/%{name} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d %{__install} -p -D -m 0700 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name}.conf %files ... %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}.conf %dir %attr(0700,root,root) %{_localstatedir}/log/%{name}