Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Multiple Apache/HTTPD Logs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
anggarda
n00b
n00b


Joined: 16 Dec 2003
Posts: 41

PostPosted: Wed Oct 31, 2007 9:42 am    Post subject: Multiple Apache/HTTPD Logs Reply with quote

Good Day, fellow Gentooers.

I would like to have 2 copies of my httpd/apache logs to exist locally within the same folder.

The simplest way I could think of, was to have a cron job which copies the logs from the syslog folder to another folder where it can be easily access by less risky users.

However, I would like for the duplicate logs to be as close to real time as possible.

Are there any facilties in any of the logging deamons which allows for this?

Thanking everyone in advance for any input.

Salut.
Back to top
View user's profile Send private message
selig
Guru
Guru


Joined: 31 Jul 2005
Posts: 425
Location: Prague, Czech Republic

PostPosted: Wed Oct 31, 2007 10:45 am    Post subject: Reply with quote

I think the only thing you need to do is put multiple "CustomLog" lines with different log names into httpd.conf... it will log the same into several files. Or alternatively you could create one or more FIFOs, run something like "tee /var/log/apache2/access.log </var/log/apache2/access.fifo >/var/safe/duplicate.log" and then start apache with "CustomLog" configured to the FIFO... but I have not tested this.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum