Alon Bar-Lev has uploaded a new change for review. Change subject: packaging: logging: port notifier to logrotate ......................................................................
packaging: logging: port notifier to logrotate Change-Id: If0c14f88fdca4ac61e22a1e2585e2cf163b3dbbd Signed-off-by: Alon Bar-Lev <alo...@redhat.com> --- M .gitignore M Makefile M ovirt-engine.spec.in M packaging/etc/notifier/log4j.xml.in A packaging/sys-etc/logrotate.d/ovirt-engine-notifier.in 5 files changed, 13 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/23/17123/1 diff --git a/.gitignore b/.gitignore index 74a1664..883406d 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ packaging/etc/engine-manage-domains/engine-manage-domains.conf packaging/etc/notifier/log4j.xml packaging/sys-etc/logrotate.d/ovirt-engine +packaging/sys-etc/logrotate.d/ovirt-engine-notifier packaging/services/config.py packaging/services/*.systemd packaging/services/*.sysv diff --git a/Makefile b/Makefile index 9292076..6dc282d 100644 --- a/Makefile +++ b/Makefile @@ -163,6 +163,7 @@ packaging/etc/engine-manage-domains/engine-manage-domains.conf \ packaging/etc/notifier/log4j.xml \ packaging/sys-etc/logrotate.d/ovirt-engine \ + packaging/sys-etc/logrotate.d/ovirt-engine-notifier \ packaging/services/config.py \ packaging/services/ovirt-engine.systemd \ packaging/services/ovirt-engine.sysv \ diff --git a/ovirt-engine.spec.in b/ovirt-engine.spec.in index a0cb07b..86cff8f 100644 --- a/ovirt-engine.spec.in +++ b/ovirt-engine.spec.in @@ -295,6 +295,7 @@ Summary: %{product_name_short} Tools Group: Virtualization/Management Requires: %{name} = %{version}-%{release} +Requires: logrotate Requires: java Requires: python-daemon @@ -908,6 +909,7 @@ %{engine_etc}/engine-manage-domains/log4j.xml # Configuration files for the notifier: +%config %{_sysconfdir}/logrotate.d/ovirt-engine-notifier %dir %{engine_etc}/notifier %ghost %config(noreplace) %{engine_etc}/notifier/notifier.conf %dir %{engine_etc}/notifier/notifier.conf.d diff --git a/packaging/etc/notifier/log4j.xml.in b/packaging/etc/notifier/log4j.xml.in index 9724157..74eb1d1 100644 --- a/packaging/etc/notifier/log4j.xml.in +++ b/packaging/etc/notifier/log4j.xml.in @@ -3,11 +3,9 @@ <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> <!-- Log levels:DEBUG,INFO,WARN,ERROR,FATAL --> - <appender name="FILE" class="org.apache.log4j.RollingFileAppender"> + <appender name="FILE" class="org.apache.log4j.FileAppender"> <param name="File" value="@ENGINE_LOG@/notifier/notifier.log" /> <param name="Append" value="true" /> - <param name="MaxFileSize" value="10000KB" /> - <param name="MaxBackupIndex" value="5" /> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d %-5p [%c] %m%n" /> diff --git a/packaging/sys-etc/logrotate.d/ovirt-engine-notifier.in b/packaging/sys-etc/logrotate.d/ovirt-engine-notifier.in new file mode 100644 index 0000000..6cbaafa --- /dev/null +++ b/packaging/sys-etc/logrotate.d/ovirt-engine-notifier.in @@ -0,0 +1,8 @@ +"@ENGINE_LOG@/notifier/notifier.log" { + daily + minsize 10M + missingok + copytruncate + rotate 5 + compress +} -- To view, visit http://gerrit.ovirt.org/17123 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If0c14f88fdca4ac61e22a1e2585e2cf163b3dbbd Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches