Browse Source

Confiured for log rotation using logrotate

Alois Mahdal 11 years ago
parent
commit
c5f065fc38
2 changed files with 8 additions and 1 deletions
  1. 1
    1
      cgi-bin/htlog/htlog.cgi
  2. 7
    0
      etc/logrotate.d/htlogr

+ 1
- 1
cgi-bin/htlog/htlog.cgi View File

@@ -18,7 +18,7 @@
18 18
 
19 19
 use CGI;
20 20
 
21
-my $LOG_FILE = 'htlog.log';
21
+my $LOG_FILE = '/var/log/htlogr.log';
22 22
 open my $fh, ">>", $LOG_FILE or die "cannot open log file for appending: $!";
23 23
 
24 24
 sub stamp {

+ 7
- 0
etc/logrotate.d/htlogr View File

@@ -0,0 +1,7 @@
1
+/var/log/htlogr.log {
2
+    weekly
3
+    rotate 8
4
+    compress
5
+    delaycompress
6
+    create 640 www-data adm
7
+}