Skip to content

Commit

Permalink
Logrotate for tendrl-api log files
Browse files Browse the repository at this point in the history
bugzilla: 1654183
tendrl-bug-id: Tendrl#455

Signed-off-by: GowthamShanmugasundaram <[email protected]>
  • Loading branch information
GowthamShanmugam committed Jan 18, 2019
1 parent 3daf5b8 commit 63f1268
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/tendrl-api_logrotate.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/var/log/tendrl/api/*.log
{
su tendrl-api tendrl-api
size=100M
rotate 10
missingok
compress
notifempty
create 0664 tendrl-api tendrl-api
}
5 changes: 5 additions & 0 deletions tendrl-api.spec
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ install -Dm 0644 config/apache.vhost.sample $RPM_BUILD_ROOT%{_sysconfdir}/httpd/
install -Dm 0644 config/puma/*.rb $RPM_BUILD_ROOT%{install_dir}/config/puma/
install -Dm 0644 config/initializers/*.rb $RPM_BUILD_ROOT%{install_dir}/config/initializers/
install -Dm 0644 firewalld/tendrl-api.xml $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/tendrl-api.xml
install -Dm 0644 config/tendrl-api_logrotate.conf $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/tendrl-api_logrotate.conf

# Symlink writable directories onto /var
ln -s %{log_dir} $RPM_BUILD_ROOT%{install_dir}/log
Expand Down Expand Up @@ -121,6 +122,7 @@ systemctl enable tendrl-api >/dev/null 2>&1 || :
%{install_dir}/
%{doc_dir}/
%{_unitdir}/tendrl-api.service
%{_sysconfdir}/logrotate.d/tendrl-api_logrotate.conf
%config(noreplace) %attr(0640, root, %{app_group}) %{config_file}
%config(noreplace) %{_prefix}/lib/firewalld/services/tendrl-api.xml

Expand All @@ -129,6 +131,9 @@ systemctl enable tendrl-api >/dev/null 2>&1 || :
%config(noreplace) %{_sysconfdir}/httpd/conf.d/tendrl.conf

%changelog
* Fri Jan 18 2019 Gowtham Shanmugasundaram <[email protected]> - 1.6.3-8
- Log rotation for tendrl log files

* Fri Jul 27 2018 Shirshendu Mukherjee <[email protected]> - 1.6.3-7
- Bugfix for recursion when non-json 'data' attr is present

Expand Down

0 comments on commit 63f1268

Please sign in to comment.