From Fedora Project Wiki

< User:Johannbg

Revision as of 09:11, 23 February 2012 by Johannbg (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 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}