/ Zope / Apsis / Pound Mailing List / Archive / 2004 / 2004-03 / Logging

[ << ] [ >> ]

[ timing transactions / Dennis Allison ... ] [ Pound / SSL : unable to authenticate / "Ralf ... ]

Logging
Joakim <joakim(at)regerar.nu>
2004-03-22 13:49:34 [ FULL ]
Im having trouble setting up logging. Everything gets logged to 
/var/log/messages and im trying to separate it but sofar to no avail. 
Could someone write a tutorial for setting this up ? What would be 
perfect is to get one file with Pound-messages and one with the Apache 
formatted stuff.

Second question. Is it possible to get a output file without the 'Date 
Time Host pound' part possible ? All that uneccesary text  uses alot of 
disk.

Third. Is per Virtual host logging possible ?
We are load balancing three separate clusters using two clustered 
Pound-boxes and getting all that data in one file and thats alot of data 
in one file.

Finally. How do i check wich Pound version im running ?


Thank you for a great product.

Best Regards
Joakim Thornberg

Re: Logging
Robert Segall <roseg(at)apsis.ch>
2004-03-22 18:25:20 [ FULL ]
On Mon, 2004-03-22 at 13:49, Joakim wrote:[...]

You have two options:

- if you use the syslog you must configure it to log the pound messages
to the files you want. Something like:

	pound.info	/var/log/pound.log
	pound.*		/var/log/pound.err

would probably do the trick, depending on the logger your system uses.

- if you compiled Pound without syslog support you need to collect
stdout for the regular log and stderr for the rest. How you do that
depends on the particular setup you use.
[...]

That part comes from the syslog and not from Pound. Use awk or sed or
even sh to get rid of it.
[...]

No. Again, awk is your friend if you need that.
[...]

Look at the RCS string in any of the source files.[...]

Re: Logging
"Steven Smith" <stsmith(at)spsmw.org>
2004-03-23 08:22:21 [ FULL ]
I know this in an old issue, but I wanted to put my vote in again.

It would be very nice if you could specify a log file in the config file
for pound. Bonus would be if you could do separate log file in each
config section. (i.e. setup Virtual host logging.)

I figured out that when running pound as an exe file on Windows, you can
NOT capture the standard out and standard error. The is no real
syslogging daemon to send to, so your stuck with NO output log files.
ONLY if you run inside cygwin posix shell, will you get logging to
cywgin syslog daemon. This is a lot of extra overhead, just to get log
file.

If you run inside Windows command window you can see message output in
standard out. However if you use redirect ">" or try to capture with
wrap around program, for some reason you do not capture the transaction
messages. I used several methods to try and capture standard out on
Windows, but only got the startup messages, and nothing else in the log
files. 

I even compiled, in cygwin, without syslog support and this didn't make
difference. 

Maybe we could have compile flag to turn on logging option. The default
would be without, to preserve current behavior. But people could compile
with this option, and then use config file for custom logs.

I like using Pound, because it is lot simpler than Apache with
mod-proxy/mod-rewrite rules. Also pound takes lot less overhead. Just
wish I could setup logs.

Thanks for reading,
Steven Smith


>>> Robert Segall <roseg(at)apsis.ch> 03/22/04 12:25 PM
>>>
On Mon, 2004-03-22 at 13:49, Joakim wrote:[...]
[...]

You have two options:

- if you use the syslog you must configure it to log the pound messages
to the files you want. Something like:

	pound.info	/var/log/pound.log
	pound.*		/var/log/pound.err

would probably do the trick, depending on the logger your system uses.

- if you compiled Pound without syslog support you need to collect
stdout for the regular log and stderr for the rest. How you do that
depends on the particular setup you use.
[...]
[...]
of [...]

That part comes from the syslog and not from Pound. Use awk or sed or
even sh to get rid of it.
[...]

No. Again, awk is your friend if you need that.
[...]
data [...]

Look at the RCS string in any of the source files.[...]

Re: Logging
Joakim Thornberg <joakim(at)regerar.nu>
2004-03-23 09:31:43 [ FULL ]
Thank you for your reply Robert. All that seemed to work out just fine
and fixed most of my problems.

A way to specify a logfile in the config would be wonderful. Errors and
runtime information can go to syslog, thats just fine.
However Webalizer, Webtrends and others need that Apachelike logformat
and processing the logs a second time to get it is abit tedious.
So im sure a separate HTTP log parameter would make alot of people happy.

Now if this some day could be done per UrlGroup.. wow.

Best Regards
Joakim Thornberg

Steven Smith wrote:
[...]
>>>>        
>>>>[...][...][...][...][...][...][...][...][...][...][...][...][...][...][...][...][...]

Re: Logging
Robert Segall <roseg(at)apsis.ch>
2004-03-23 11:25:37 [ FULL ]
On Tue, 2004-03-23 at 09:31, Joakim Thornberg wrote:[...]

Glad to hear it helped.
[...]

I fully understand the issue, but please try to look at it from a
security point of view (i.e. with a heavy dose of paranoia). What is
safer: a program that never ever opens a file in write mode and has no
open files AT ALL at runtime, or a program that writes to files all over
the place?

We use syslog ON PURPOSE so that we can avoid several nasty security
issues:

- Pound never opens a file in write-mode
- Pound only reads the config file once, before ever listening to any
requests, and closes it.
- Pound opens no other file AT ALL.
- Pound cannot modify (or even access) its own logs, thus allowing
forensics with a high degree of confidence.

In addition, by using syslog, we can avoid the problems inherent in a
root-jail and/or setuid environment (are the putative log files even
accessible from there?) and we allow for convenient logging on a remote
machine.
[...]

The various log-processing tools accept data from stdin, so using
awk/cut as a first pipe element is fine.[...]

MailBoxer