RE: [users@httpd] Remote Logging access_log with syslog-ng

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I know.

 

But this is exactly whay I am trying to avoid! I don’t want too many open files (which happens when every vhost has their own logfiles) nor do I want logger threads for each vhost.

I want logger and syslog too handle the load of logging not Apache.

 

Regards,

 

Jan


Van: PMilanese@xxxxxxxx [mailto:PMilanese@xxxxxxxx]
Verzonden: woensdag 15 juni 2005 19:51
Aan: users@xxxxxxxxxxxxxxxx
Onderwerp: RE: [users@httpd] Remote Logging access_log with syslog-ng

 

You can pipe vhosts to their own logs. There is no way that I know of to put this in the main config though (i.e. servername as a variable), so you need to create CustomLog entries for each vhost, putting the servername as an argument (or in the filename).

 

P

 


From: Jan van den Berg [mailto:janvdberg@xxxxxxxxx]
Sent: Wednesday, June 15, 2005 9:53 AM
To: users@xxxxxxxxxxxxxxxx
Subject: [users@httpd] Remote Logging access_log with syslog-ng

 

Hi,

 

(please ignore my last post)

 

Right now I have a syslog-ng server that logs all access_log files from different virtual hosts in one big file.

But Im looking for a way to log accesslogs to  virtualhostname.log files instead of one big file.

 

My setup:

 

CustomLog "| /usr/bin/logger -p local7.info" combined

 

This opens one Logger thread under the Apache main thread and puts all the logger information in one big file.

 

The following setup does what I want; but this opens a bash thread under Apache.. not something you want.

 

LogFormat "logger -t %v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined2

CustomLog "|/bin/bash" combined2

 

With the following in syslog-ng.conf:

destination localhost_site_access{ file("/var/log/apache/$PROGRAM"); };

 

This works in a sense that it puts the different VirtualHost logs in logs with their name. This is what I want but I don’t want to use the ‘bash’ solution.

Maybe it’s possible to hack /usr/bin/logger: I need a way to specify a $PROGRAM name in syslog-NG. Or is their another solution?

 

Any tips?

 

Regards,

Jan

 


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux