Current time: 11-23-2024, 03:34 PM Hello There, Guest! (LoginRegister)


Post Reply 
Single combine log, is possible?
Author Message
romeo Offline


Posts: 4
Joined: Jun 2009
Reputation: 0
Post: #1
Single combine log, is possible?
Hi all,
I wuold like to know if there is a way to have a single combine log for all the virtual host in a server.
I have tried to edit the apache2.conf and adding Cusomlog directive, but i suppose this is not the right way.

My idea is to use the tail -f command to see al the web server traffic in real time, i don't really need a single log file, maybe there is a unix turnaround i don't know.

Thanks in advance

Romeo
06-17-2009 02:38 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: Single combine log, is possible?
Quote:I wuold like to know if there is a way to have a single combine log for all the virtual host in a server.

Add an additional "CustomLog" directive to the apache's main configuration file Smile
06-17-2009 10:43 PM
Visit this user's website Find all posts by this user Quote this message in a reply
romeo Offline


Posts: 4
Joined: Jun 2009
Reputation: 0
Post: #3
RE: Single combine log, is possible?
I have tried to add it, but the result is like this:

::1 - - [16/Jun/2009:18:21:55 +0200] "GET / HTTP/1.0" 200 44 "-" "Apache/2.2.3 (Debian) mod_fastcgi/2.4.2 (internal dummy connection
)"

I thins something went wrong in mi directive.

I have tried that in apache2.conf

LogFormat "%v %l %u %t \"%r\" %>s %b" comonvhost
CustomLog /var/log/apache2/access_log comonvhost

and also there:
CustomLog /var/log/apache2/common_log common
CustomLog /var/log/apache2/referrer_log referrer
CustomLog /var/log/apache2/combined_log combined
CustomLog /var/log/apache2/agent_log agent

but nope.
Which is the right customlog directive for virtual server under ispcp?
06-19-2009 07:15 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: Single combine log, is possible?
Which ispcp version are you using?
06-19-2009 08:05 PM
Visit this user's website Find all posts by this user Quote this message in a reply
romeo Offline


Posts: 4
Joined: Jun 2009
Reputation: 0
Post: #5
RE: Single combine log, is possible?
ispCP 1.0.0 RC6 OMEGA
build: 20080806
06-19-2009 08:22 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #6
RE: Single combine log, is possible?
This version used a different log handling method than the current one (stable), and I'm quite sure that it doesn't allow output both per-user logs and a global one.

Thus, your only option is to "tail all them at once":
Code:
cd /var/log/apache2
for foo in *-combined.log; do tail -f $foo | awk '{print "'${foo%-combined.log}'",$0}' & done

To stop seeing logs, you'll have to kill the bunch of tail processes:
Code:
killall /usr/bin/tail
(This post was last modified: 06-20-2009 01:56 AM by kilburn.)
06-20-2009 01:56 AM
Visit this user's website Find all posts by this user Quote this message in a reply
romeo Offline


Posts: 4
Joined: Jun 2009
Reputation: 0
Post: #7
RE: Single combine log, is possible?
Thanks,
i will try the trick for now and plan an upgrade in the next few months.
06-20-2009 03:37 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)