0

Trying to use Apache's rotatelogs utility for rotating my Subversion access and error logs and below is my configuration:

ErrorLog "|/opt/CollabNet_Subversion/bin/rotatelogs /var/opt/CollabNet_Subversion/logs/svn_errorlog.%Y-%m-%d-%H_%M_%S 5M"

CustomLog "|/opt/CollabNet_Subversion/bin/rotatelogs /var/opt/CollabNet_Subversion/logs/svn_accesslog.%Y-%m-%d-%H_%M_%S 5M" common

and have commented out the default ErrorLog and CustomLog entries and did a restart.

but I don't see log rotation happening on the target directory.

I grepped the process id and rotatelogs process is alive

ps -ef|grep rotatelogs
root     25385 25384  0 08:16 ?        00:00:00 /opt/CollabNet_Subversion/bin/rotatelogs /var/opt/CollabNet_Subversion/logs/svn_errorlog.%Y-%m-%d-%H_%M_%S 5M
root     25386 25384  0 08:16 ?        00:00:00 /opt/CollabNet_Subversion/bin/rotatelogs /var/opt/CollabNet_Subversion/logs/svn_accesslog.%Y-%m-%d-%H_%M_%S 5M
root     25858 25384  0 08:16 ?        00:00:00 /opt/CollabNet_Subversion/bin/rotatelogs /var/opt/CollabNet_Subversion/logs/svn_accesslog.%Y-%m-%d-%H_%M_%S 5M
2585     25827 24938  0 09:27 pts/0    00:00:00 grep rotatelogs 

I'm not sure where and how to debug and I'm looking to use the rotatelogs option not the logrotate utility.

OS - RHEL 6.8

svn server - svn, version 1.9.4 (r1740329)

[CollabNet flavor, not the CollabnetEdge]

(P.S: Installed using the follwing rpm:CollabNetSubversion-server-1.9.4- 2.x86_64.rpm )

voltas
  • 553
  • 7
  • 24

1 Answers1

1

Did the log file size reach 5 MB? It won't rotate until then with the 5M setting you have.

  • Thanks for your time, yes log file crossed beyond the file size. ls -lh `-rw-r--r-- 1 root root 121M Feb 22 09:52 access_log -rw-r--r-- 1 root root 29M Feb 22 09:43 error_log` and a strange thing, whenever I restart the apache/SVN server, error log gets rotated like below. `-rw-r--r-- 1 root root 537 Feb 22 08:16 svn_errorlog.2017-02-22-14_16_13 -rw-r--r-- 1 root root 537 Feb 22 09:42 svn_errorlog.2017-02-22-15_42_27 -rw-r--r-- 1 root root 537 Feb 22 09:43 svn_errorlog.2017-02-22-15_42_59` – voltas Feb 22 '17 at 15:59