You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ben Collins-Sussman <su...@collab.net> on 2005/08/02 21:38:55 UTC

logging: drill down a bit

Let me drill down a wee bit on the proposal we're pushing.

The main point of the proposal is not to reinvent logging, but rather
to re-use existing logging facilities.  In the case of svnserve, it
should be a "good citizen" by writing to either the unix syslogd or to
the windows event subsystem.  In the case of mod_dav_svn, it is a
"good citizen" by writing to apache's existing accesslog.

But I'm also hearing some people ask for more flexibility here:

   1. People may want to specify that svn-related messages be put into a
      separate logfile.  (In other words, don't just dump svnserve
      messages into /var/log/messages, and don't just dump mod_dav_svn
      messages into apache's accesslog.)

   2. People may want to specify that per-repository messages be
      written to per-repository logfiles.

What I'm wondering is: do the existing logging subsystems provide this
sort of flexibility?   Assuming that the messages being sent to
{syslogd, windows event system, apache logging system} are
sufficiently detailed, can these three systems be jiggered to do the
sort of filtering described above?  If so, then I think everyone can
be happy.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: logging: drill down a bit

Posted by Branko Čibej <br...@xbc.nu>.
Ben Collins-Sussman wrote:

> Let me drill down a wee bit on the proposal we're pushing.
>
> The main point of the proposal is not to reinvent logging, but rather
> to re-use existing logging facilities.  In the case of svnserve, it
> should be a "good citizen" by writing to either the unix syslogd or to
> the windows event subsystem.  In the case of mod_dav_svn, it is a
> "good citizen" by writing to apache's existing accesslog.
>
> But I'm also hearing some people ask for more flexibility here:
>
>   1. People may want to specify that svn-related messages be put into a
>      separate logfile.  (In other words, don't just dump svnserve
>      messages into /var/log/messages, and don't just dump mod_dav_svn
>      messages into apache's accesslog.)
>
>   2. People may want to specify that per-repository messages be
>      written to per-repository logfiles.
>
> What I'm wondering is: do the existing logging subsystems provide this
> sort of flexibility?   Assuming that the messages being sent to
> {syslogd, windows event system, apache logging system} are
> sufficiently detailed, can these three systems be jiggered to do the
> sort of filtering described above?  If so, then I think everyone can
> be happy.

You can create custom event logs on Windows 2000 and later. I think you 
can even configure the logging system to use this log for a particular 
event log without changing the code that produces the logs. The only 
thing that you have to do is to register your app as a distinct event 
source (that has to be done in the code), the rest can be tweaked in the 
Registry.

The really serious catch is that you can't configure the logging system 
to write logs to a file or to stdout/err, which IIRC syslog can do.

-- Brane


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: logging: drill down a bit

Posted by Michael Sinz <Mi...@sinz.org>.
Michael Sweet wrote:
> Michael Sinz wrote:
> 
>> ...
>> Which syslogd?  The one RedHat ships with its Linux?  The one on
>> FreeBSD 4.x?  The one on TurboLinux?  The one with AIX?
>> ...
> 
> I specifically looked at the syslog.conf man page on a Red Hat
> system, figuring it would have the most bells and whistles.  If
> there are more functional syslogd implementations out there, then
> great!  But keep in mind that most developers will be using the
> "stock" syslogd...

You would think that RedHat goes the "bells-n-whistles" but not this time...
In fact, it was fun to get a FreeBSD service moved over to RedHat since we
had to replace the syslogd with the one from FreeBSD.  (Albeit other newer
syslogd implementations are even nicer - and are what I run now on any
significant logging server since they support TCP and not just UDP and also
support complex filtering, assured delivery, etc.)

Anyway, the other syslogd versions out there do not change the software API,
just the configuration features.  The software API is rather simple.

-- 
Michael Sinz                     Technology and Engineering Director/Consultant
"Starting Startups"                                mailto:michael.sinz@sinz.org
My place on the web                            http://www.sinz.org/Michael.Sinz

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: logging: drill down a bit

Posted by Michael Sweet <mi...@easysw.com>.
Michael Sinz wrote:
> ...
> Which syslogd?  The one RedHat ships with its Linux?  The one on
> FreeBSD 4.x?  The one on TurboLinux?  The one with AIX?
> ...

I specifically looked at the syslog.conf man page on a Red Hat
system, figuring it would have the most bells and whistles.  If
there are more functional syslogd implementations out there, then
great!  But keep in mind that most developers will be using the
"stock" syslogd...

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: logging: drill down a bit

Posted by Michael Sinz <mi...@gmail.com>.
On 8/2/05, Michael Sweet <mi...@easysw.com> wrote:
> Ben Collins-Sussman wrote:
> > ...
> > What I'm wondering is: do the existing logging subsystems provide this
> > sort of flexibility?   Assuming that the messages being sent to
> > {syslogd, windows event system, apache logging system} are
> > sufficiently detailed, can these three systems be jiggered to do the
> > sort of filtering described above?  If so, then I think everyone can
> > be happy.
> 
> Apache can be instructed to send log data to different files based
> on the VirtualHost, Directory, and/or Location you are accessing.
> 
> syslogd doesn't offer quite the same configurability - you can filter
> based on facility and log level, but that's about it.

Which syslogd?  The one RedHat ships with its Linux?  The one on
FreeBSD 4.x?  The one on TurboLinux?  The one with AIX?

The syslogd I use has full regex filtering and rules support.  So it can
do a lot of wonderful things as far as what goes into what files.

NOTE - by the time a log message gets to syslogd, it is too late to get
the message into STDOUT or STDERR.  However, that is controlled
in software when opening the "log" in openlog() (thus needs support
in software to set that flag)  All other behaviors are controlled
from syslogd, including console output/warning/alerting (sending to
my pager, etc)

-- 
Michael Sinz               Technology and Engineering Director/Consultant
"Starting Startups"                          mailto:Michael.Sinz@sinz.org
My place on the web                      http://www.sinz.org/Michael.Sinz

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: logging: drill down a bit

Posted by Michael Sweet <mi...@easysw.com>.
C. Michael Pilato wrote:
> ...
>>Apache can be instructed to send log data to different files based
>>on the VirtualHost, Directory, and/or Location you are accessing.
> 
> 
> I had this same thought, but my reading of the Apache docs leads me to
> believe that only server- and vhost-level configuration is permitted,
> not directory or location.  Did I misread?  Are the docs wrong?

No, you're right, log directives can only be in VirtualHost or the
top-level server configuration.  That'll teach me to hit send before
verifying the documentation...

I think this will still be sufficient for most installations,
especially since you can do the pipe thing to split the logs into
separate, repo-specific files.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: logging: drill down a bit

Posted by "C. Michael Pilato" <cm...@collab.net>.
Michael Sweet <mi...@easysw.com> writes:

> Ben Collins-Sussman wrote:
> > ...
> > What I'm wondering is: do the existing logging subsystems provide this
> > sort of flexibility?   Assuming that the messages being sent to
> > {syslogd, windows event system, apache logging system} are
> > sufficiently detailed, can these three systems be jiggered to do the
> > sort of filtering described above?  If so, then I think everyone can
> > be happy.
> 
> Apache can be instructed to send log data to different files based
> on the VirtualHost, Directory, and/or Location you are accessing.

I had this same thought, but my reading of the Apache docs leads me to
believe that only server- and vhost-level configuration is permitted,
not directory or location.  Did I misread?  Are the docs wrong?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: logging: drill down a bit

Posted by Michael Sweet <mi...@easysw.com>.
Ben Collins-Sussman wrote:
> ...
> What I'm wondering is: do the existing logging subsystems provide this
> sort of flexibility?   Assuming that the messages being sent to
> {syslogd, windows event system, apache logging system} are
> sufficiently detailed, can these three systems be jiggered to do the
> sort of filtering described above?  If so, then I think everyone can
> be happy.

Apache can be instructed to send log data to different files based
on the VirtualHost, Directory, and/or Location you are accessing.

syslogd doesn't offer quite the same configurability - you can filter
based on facility and log level, but that's about it.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org