Russell-IO / php-syslog-ng

Automatically exported from code.google.com/p/php-syslog-ng
1 stars 0 forks source link

avoid removing old logs #162

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
hi, 

i installed php-syslog-ng 2.9.8m version successfully.
all the loggings are loged to the php-syslog-ng successfully. 

but i notice i cant view last month logs in php-syslog-ng web GUI and also
they are not contain in the mysql database.

i hope that they removed from the database as well.

my requirement is to display all the logs without deleting even a single
log. i hope this can be done modifying a single file.

could you plz anyone help me . this is a urgent case.

i hope your reply immediately

tnx a lot.

Original issue reported on code.google.com by harshaa...@gmail.com on 2 Dec 2009 at 5:50

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
hi 

can i achieve this by modifying the logrotate.conf file

# see "man logrotate" for details
# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# uncomment this if you want your log files compressed
#compress

# RPM packages drop log rotation information into this directory
include /etc/logrotate.d

# no packages own wtmp -- we'll rotate them here
/var/log/wtmp {
    monthly
    minsize 1M
    create 0664 root utmp
    rotate 1
}

# system-specific logs may be also be configured here.

once i uncomment the "keep 4 weeks worth of backlogs " line , can i achieve my 
goal ?

Original comment by harshaa...@gmail.com on 2 Dec 2009 at 6:06

GoogleCodeExporter commented 9 years ago
hi cduke 

could you plz provide me a way to achieve this. its bit much urgent

tnx a lot

Original comment by dileeka....@gmail.com on 3 Dec 2009 at 4:29

GoogleCodeExporter commented 9 years ago
hi cduke ,

i found a method to do it. by modifying the following line in  config.php file.

define('LOGROTATERETENTION', 90);

my requirement is not to have just last 90 days log , i have to keep all logs 
in my
database without dropping even a single log 

for the is purpose how can i set the  LOGROTATERETENTION variable ?

plz be kind enough to reply me soon.

Original comment by dileeka....@gmail.com on 3 Dec 2009 at 6:07

GoogleCodeExporter commented 9 years ago
Set the LOGROTATERETENTION to whatever number you want, but just be aware that 
if you
have a large amount of logs, then your system will eventually get very slow.

Original comment by cdu...@gmail.com on 23 Dec 2009 at 2:12