You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ben Laurie <be...@algroup.co.uk> on 2001/08/27 15:54:01 UTC

[Fwd: [Spread-users] send text to spread group from command line?]

Would anyone object to me committing this?

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Re: [Fwd: [Spread-users] send text to spread group from command line?]

Posted by George Schlossnagle <ge...@mail.communityconnect.com>.
Makes sense.  Still it would be nice to be able to run core_error_log
conditionally.  So that I can send my logs to spread, send an SNMP trap and
not log to disk, because I confirmed I succeeded in one of the first two.
That's why I think it should be run last (except perhaps a fatal level error
logger at the head of the bunch).  The point is that I don't want to
unconditionally send logs to /dev/null, but only if I succeeded in sending
them with my user-defined method.

----- Original Message -----
From: "Ryan Bloom" <rb...@covalent.net>
To: "George Schlossnagle" <ge...@mail.communityconnect.com>;
<de...@httpd.apache.org>
Sent: Monday, August 27, 2001 11:33 AM
Subject: Re: [Fwd: [Spread-users] send text to spread group from command
line?]


> On Monday 27 August 2001 08:14, George Schlossnagle wrote:
> > Hmmm...  I undesrtand you concern.  It might be nice to have a 'panic'
type
> > log.  Still, implementing a RUN_FIRST hook has the benefit of saying
'Try
> > and log however you want, and if you fail, then fall onto core_logging'.
> > Sometimes people don't want redundancy in their logs, sometimes you want
to
> > be guaranteed you have one copy of it somewhere without always having 3
> > copies.
>
> I understand this.  The problem is that a RUN_FIRST removes any level
> of redundancy.  A RUN_ALL allows the server admin to setup as much
> redundancy as they want.  If you want to log to just spread, then set
> ErrorLog to /dev/null.  If it is a RUN_FIRST, and I want to log to spread,
> and send an SNMP trap whenever I get a critical error, how do I do that?
>
> This needs to be a RUN_ALL.
>
> Ryan
>
> > The specific instance I see for this is error logging via spread.  It
would
> > be swell to be able to just dump error logs to spread, and write to disk
if
> > and only if there was a problem (in which case, you have the logging
module
> > return a DECLINED and then you log to disk.)  Implementing the hook
where I
> > did also allows you to add a run-first panic log hook that always logs
> > fatal errors to disk, and returns DECLINED to let the rest of the
handlers
> > run.
> >
> > Thoughts?
> >
> > George
> >
> >
> > ----- Original Message -----
> > From: "Ryan Bloom" <rb...@covalent.net>
> > To: "George Schlossnagle" <ge...@mail.communityconnect.com>;
> > <de...@httpd.apache.org>
> > Cc: <de...@httpd.apache.org>
> > Sent: Monday, August 27, 2001 11:08 AM
> > Subject: Re: [Fwd: [Spread-users] send text to spread group from command
> > line?]
> >
> > > On Monday 27 August 2001 07:26, George Schlossnagle wrote:
> > > > For better or for worse, there are alot of folks who would prefer to
> >
> > turn
> >
> > > > off local error logging completely, and do all logging via a
> > > > distributed mechanism.  Actually, I was also considering whether it
> > > > would be better
> >
> > to
> >
> > > > do a AP_IMPLEMENT_HOOK_RUN_FIRST, so that you can /truly/ override
the
> > > > internal logging mechanism safely.  Would that fit people's
> > > > safety/flexibility concerns better?
> > >
> > > There are still ways to disable the logging to the disk, but I am
> >
> > concerned that
> >
> > > if you allow modules to run before the core's error logging mechanism,
> >
> > then
> >
> > > you take the very real chance that you will never see any logs, ever.
> > >
> > > Also, this should not be a RUN_FIRST, because that removes any
redundancy
> > > in the system at all.
> > >
> > > Ryan
> > >
> > > ______________________________________________________________
> > > Ryan Bloom                        rbb@apache.org
> > > Covalent Technologies rbb@covalent.net
> > > --------------------------------------------------------------
>
> --
>
> ______________________________________________________________
> Ryan Bloom                        rbb@apache.org
> Covalent Technologies rbb@covalent.net
> --------------------------------------------------------------
>



Re: [Fwd: [Spread-users] send text to spread group from command line?]

Posted by Ryan Bloom <rb...@covalent.net>.
On Monday 27 August 2001 08:14, George Schlossnagle wrote:
> Hmmm...  I undesrtand you concern.  It might be nice to have a 'panic' type
> log.  Still, implementing a RUN_FIRST hook has the benefit of saying 'Try
> and log however you want, and if you fail, then fall onto core_logging'.
> Sometimes people don't want redundancy in their logs, sometimes you want to
> be guaranteed you have one copy of it somewhere without always having 3
> copies.

I understand this.  The problem is that a RUN_FIRST removes any level
of redundancy.  A RUN_ALL allows the server admin to setup as much
redundancy as they want.  If you want to log to just spread, then set
ErrorLog to /dev/null.  If it is a RUN_FIRST, and I want to log to spread,
and send an SNMP trap whenever I get a critical error, how do I do that?

This needs to be a RUN_ALL.

Ryan

> The specific instance I see for this is error logging via spread.  It would
> be swell to be able to just dump error logs to spread, and write to disk if
> and only if there was a problem (in which case, you have the logging module
> return a DECLINED and then you log to disk.)  Implementing the hook where I
> did also allows you to add a run-first panic log hook that always logs
> fatal errors to disk, and returns DECLINED to let the rest of the handlers
> run.
>
> Thoughts?
>
> George
>
>
> ----- Original Message -----
> From: "Ryan Bloom" <rb...@covalent.net>
> To: "George Schlossnagle" <ge...@mail.communityconnect.com>;
> <de...@httpd.apache.org>
> Cc: <de...@httpd.apache.org>
> Sent: Monday, August 27, 2001 11:08 AM
> Subject: Re: [Fwd: [Spread-users] send text to spread group from command
> line?]
>
> > On Monday 27 August 2001 07:26, George Schlossnagle wrote:
> > > For better or for worse, there are alot of folks who would prefer to
>
> turn
>
> > > off local error logging completely, and do all logging via a
> > > distributed mechanism.  Actually, I was also considering whether it
> > > would be better
>
> to
>
> > > do a AP_IMPLEMENT_HOOK_RUN_FIRST, so that you can /truly/ override the
> > > internal logging mechanism safely.  Would that fit people's
> > > safety/flexibility concerns better?
> >
> > There are still ways to disable the logging to the disk, but I am
>
> concerned that
>
> > if you allow modules to run before the core's error logging mechanism,
>
> then
>
> > you take the very real chance that you will never see any logs, ever.
> >
> > Also, this should not be a RUN_FIRST, because that removes any redundancy
> > in the system at all.
> >
> > Ryan
> >
> > ______________________________________________________________
> > Ryan Bloom                        rbb@apache.org
> > Covalent Technologies rbb@covalent.net
> > --------------------------------------------------------------

-- 

______________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: [Fwd: [Spread-users] send text to spread group from command line?]

Posted by George Schlossnagle <ge...@mail.communityconnect.com>.
Hmmm...  I undesrtand you concern.  It might be nice to have a 'panic' type
log.  Still, implementing a RUN_FIRST hook has the benefit of saying 'Try
and log however you want, and if you fail, then fall onto core_logging'.
Sometimes people don't want redundancy in their logs, sometimes you want to
be guaranteed you have one copy of it somewhere without always having 3
copies.

The specific instance I see for this is error logging via spread.  It would
be swell to be able to just dump error logs to spread, and write to disk if
and only if there was a problem (in which case, you have the logging module
return a DECLINED and then you log to disk.)  Implementing the hook where I
did also allows you to add a run-first panic log hook that always logs fatal
errors to disk, and returns DECLINED to let the rest of the handlers run.

Thoughts?

George


----- Original Message -----
From: "Ryan Bloom" <rb...@covalent.net>
To: "George Schlossnagle" <ge...@mail.communityconnect.com>;
<de...@httpd.apache.org>
Cc: <de...@httpd.apache.org>
Sent: Monday, August 27, 2001 11:08 AM
Subject: Re: [Fwd: [Spread-users] send text to spread group from command
line?]


>
> On Monday 27 August 2001 07:26, George Schlossnagle wrote:
> > For better or for worse, there are alot of folks who would prefer to
turn
> > off local error logging completely, and do all logging via a distributed
> > mechanism.  Actually, I was also considering whether it would be better
to
> > do a AP_IMPLEMENT_HOOK_RUN_FIRST, so that you can /truly/ override the
> > internal logging mechanism safely.  Would that fit people's
> > safety/flexibility concerns better?
>
> There are still ways to disable the logging to the disk, but I am
concerned that
> if you allow modules to run before the core's error logging mechanism,
then
> you take the very real chance that you will never see any logs, ever.
>
> Also, this should not be a RUN_FIRST, because that removes any redundancy
> in the system at all.
>
> Ryan
>
> ______________________________________________________________
> Ryan Bloom                        rbb@apache.org
> Covalent Technologies rbb@covalent.net
> --------------------------------------------------------------
>



Re: [Fwd: [Spread-users] send text to spread group from command line?]

Posted by Ryan Bloom <rb...@covalent.net>.
On Monday 27 August 2001 07:26, George Schlossnagle wrote:
> For better or for worse, there are alot of folks who would prefer to turn
> off local error logging completely, and do all logging via a distributed
> mechanism.  Actually, I was also considering whether it would be better to
> do a AP_IMPLEMENT_HOOK_RUN_FIRST, so that you can /truly/ override the
> internal logging mechanism safely.  Would that fit people's
> safety/flexibility concerns better?

There are still ways to disable the logging to the disk, but I am concerned that 
if you allow modules to run before the core's error logging mechanism, then
you take the very real chance that you will never see any logs, ever.

Also, this should not be a RUN_FIRST, because that removes any redundancy
in the system at all.

Ryan

______________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: [Fwd: [Spread-users] send text to spread group from command line?]

Posted by George Schlossnagle <ge...@mail.communityconnect.com>.
For better or for worse, there are alot of folks who would prefer to turn
off local error logging completely, and do all logging via a distributed
mechanism.  Actually, I was also considering whether it would be better to
do a AP_IMPLEMENT_HOOK_RUN_FIRST, so that you can /truly/ override the
internal logging mechanism safely.  Would that fit people's
safety/flexibility concerns better?

George

----- Original Message -----
From: "Ben Laurie" <be...@algroup.co.uk>
To: <rb...@covalent.net>
Cc: <de...@httpd.apache.org>; "Apache List" <ne...@apache.org>
Sent: Monday, August 27, 2001 10:14 AM
Subject: Re: [Fwd: [Spread-users] send text to spread group from command
line?]


> Ryan Bloom wrote:
> >
> > I would.  But I have a very good reason.  We already have the same
> > basic idea, but done a bit safer.  Basically, we have a log_error hook,
> > but it is run at the end of log_error_core, so that we are sure that we
> > always get the error in the error_log, even if we don't get it anyplace
> > else.  There are some minor tweaks that should be made to the
> > current hook, because right now it actually sends out too much
> > information, like the timestamp.  But, it should handle what George
wants
> > just fine.
>
> I don't see why this is any safer than George's proposal, though -
> indeed, IMO, his is more elegant since it makes it easier for someone
> who really wants to disable the standard error logging to be able to do
> so.
>
> Cheers,
>
> Ben.
>
> --
> http://www.apache-ssl.org/ben.html
>
> "There is no limit to what a man can do or how far he can go if he
> doesn't mind who gets the credit." - Robert Woodruff
>



Re: [Fwd: [Spread-users] send text to spread group from command line?]

Posted by Ryan Bloom <rb...@covalent.net>.
On Monday 27 August 2001 09:12, Ben Laurie wrote:
> Ryan Bloom wrote:
> > On Monday 27 August 2001 07:14, Ben Laurie wrote:
> > > Ryan Bloom wrote:
> > > > I would.  But I have a very good reason.  We already have the same
> > > > basic idea, but done a bit safer.  Basically, we have a log_error
> > > > hook, but it is run at the end of log_error_core, so that we are sure
> > > > that we always get the error in the error_log, even if we don't get
> > > > it anyplace else.  There are some minor tweaks that should be made to
> > > > the current hook, because right now it actually sends out too much
> > > > information, like the timestamp.  But, it should handle what George
> > > > wants just fine.
> > >
> > > I don't see why this is any safer than George's proposal, though -
> > > indeed, IMO, his is more elegant since it makes it easier for someone
> > > who really wants to disable the standard error logging to be able to do
> > > so.
> >
> > Ah, but the point of my patch was to make that harder to do, not easier. 
> > :-) My thinking was that error logs are everything.  If you lose a log,
> > then there is a problem.  If a module seg faults during the error_log,
> > then you may not ever know that there was a problem.  This way, we are
> > sure the have the log on the disk regardless of what else happens.  If
> > you want to disable the disk- based log, just log to /dev/null.
>
> So make the core hook run first - I still think George's was better.

So go ahead and change it to the new model.  I didn't veto, I just said don't
commit it wholesale, because we already have that feature.

Ryan

______________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: [Fwd: [Spread-users] send text to spread group from command line?]

Posted by Ben Laurie <be...@algroup.co.uk>.
Ryan Bloom wrote:
> 
> On Monday 27 August 2001 07:14, Ben Laurie wrote:
> > Ryan Bloom wrote:
> > > I would.  But I have a very good reason.  We already have the same
> > > basic idea, but done a bit safer.  Basically, we have a log_error hook,
> > > but it is run at the end of log_error_core, so that we are sure that we
> > > always get the error in the error_log, even if we don't get it anyplace
> > > else.  There are some minor tweaks that should be made to the
> > > current hook, because right now it actually sends out too much
> > > information, like the timestamp.  But, it should handle what George wants
> > > just fine.
> >
> > I don't see why this is any safer than George's proposal, though -
> > indeed, IMO, his is more elegant since it makes it easier for someone
> > who really wants to disable the standard error logging to be able to do
> > so.
> 
> Ah, but the point of my patch was to make that harder to do, not easier.  :-)
> My thinking was that error logs are everything.  If you lose a log, then there
> is a problem.  If a module seg faults during the error_log, then you may not
> ever know that there was a problem.  This way, we are sure the have the log
> on the disk regardless of what else happens.  If you want to disable the disk-
> based log, just log to /dev/null.

So make the core hook run first - I still think George's was better.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Re: [Fwd: [Spread-users] send text to spread group from command line?]

Posted by Ryan Bloom <rb...@covalent.net>.
On Monday 27 August 2001 07:14, Ben Laurie wrote:
> Ryan Bloom wrote:
> > I would.  But I have a very good reason.  We already have the same
> > basic idea, but done a bit safer.  Basically, we have a log_error hook,
> > but it is run at the end of log_error_core, so that we are sure that we
> > always get the error in the error_log, even if we don't get it anyplace
> > else.  There are some minor tweaks that should be made to the
> > current hook, because right now it actually sends out too much
> > information, like the timestamp.  But, it should handle what George wants
> > just fine.
>
> I don't see why this is any safer than George's proposal, though -
> indeed, IMO, his is more elegant since it makes it easier for someone
> who really wants to disable the standard error logging to be able to do
> so.

Ah, but the point of my patch was to make that harder to do, not easier.  :-)
My thinking was that error logs are everything.  If you lose a log, then there
is a problem.  If a module seg faults during the error_log, then you may not
ever know that there was a problem.  This way, we are sure the have the log
on the disk regardless of what else happens.  If you want to disable the disk-
based log, just log to /dev/null.

Ryan

______________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: [Fwd: [Spread-users] send text to spread group from command line?]

Posted by Ben Laurie <be...@algroup.co.uk>.
Ryan Bloom wrote:
> 
> I would.  But I have a very good reason.  We already have the same
> basic idea, but done a bit safer.  Basically, we have a log_error hook,
> but it is run at the end of log_error_core, so that we are sure that we
> always get the error in the error_log, even if we don't get it anyplace
> else.  There are some minor tweaks that should be made to the
> current hook, because right now it actually sends out too much
> information, like the timestamp.  But, it should handle what George wants
> just fine.

I don't see why this is any safer than George's proposal, though -
indeed, IMO, his is more elegant since it makes it easier for someone
who really wants to disable the standard error logging to be able to do
so.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Re: [Fwd: [Spread-users] send text to spread group from command line?]

Posted by Ryan Bloom <rb...@covalent.net>.
On Monday 27 August 2001 07:10, Ben Laurie wrote:
> Ryan Bloom wrote:
> > I would.  But I have a very good reason.  We already have the same
> > basic idea, but done a bit safer.  Basically, we have a log_error hook,
> > but it is run at the end of log_error_core, so that we are sure that we
> > always get the error in the error_log, even if we don't get it anyplace
> > else.  There are some minor tweaks that should be made to the
> > current hook, because right now it actually sends out too much
> > information, like the timestamp.  But, it should handle what George wants
> > just fine.
>
> Heh! Good point! When did that go in?

I added it in 2.0.19.

Ryan
______________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------

Re: [Fwd: [Spread-users] send text to spread group from command line?]

Posted by Ben Laurie <be...@algroup.co.uk>.
Ryan Bloom wrote:
> 
> I would.  But I have a very good reason.  We already have the same
> basic idea, but done a bit safer.  Basically, we have a log_error hook,
> but it is run at the end of log_error_core, so that we are sure that we
> always get the error in the error_log, even if we don't get it anyplace
> else.  There are some minor tweaks that should be made to the
> current hook, because right now it actually sends out too much
> information, like the timestamp.  But, it should handle what George wants
> just fine.

Heh! Good point! When did that go in?

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Re: [Fwd: [Spread-users] send text to spread group from command line?]

Posted by Ryan Bloom <rb...@covalent.net>.
I would.  But I have a very good reason.  We already have the same
basic idea, but done a bit safer.  Basically, we have a log_error hook,
but it is run at the end of log_error_core, so that we are sure that we
always get the error in the error_log, even if we don't get it anyplace
else.  There are some minor tweaks that should be made to the
current hook, because right now it actually sends out too much
information, like the timestamp.  But, it should handle what George wants
just fine.

Ryan

On Monday 27 August 2001 06:54, Ben Laurie wrote:
> Would anyone object to me committing this?
>
> Cheers,
>
> Ben.
>
> --
> http://www.apache-ssl.org/ben.html
>
> "There is no limit to what a man can do or how far he can go if he
> doesn't mind who gets the credit." - Robert Woodruff

> X-Sieve: cmu-sieve 2.0
> Return-Path: <ge...@omniti.com>
> Received: from mailgate.algroup.co.uk (mailgate.algroup.co.uk [194.128.162.5])
> 	by scuzzy.ben.algroup.co.uk (Postfix) with SMTP id 7371B2E9A9
> 	for <be...@scuzzy.ben.algroup.co.uk>; Mon, 27 Aug 2001 03:34:05 +0000 (GMT)
> Received: (qmail 1174 invoked by uid 1002); 27 Aug 2001 03:33:25 -0000
> Delivered-To: aldigit-ben@algroup.co.uk
> Received: (qmail 23543 invoked from network); 27 Aug 2001 03:33:25 -0000
> Received: from longsword.omniti.com (exim@216.0.51.134)
>   by mailgate.algroup.co.uk with SMTP; 27 Aug 2001 03:33:25 -0000
> Received: from [216.5.117.60] (helo=maya)
> 	by longsword.omniti.com with esmtp (Exim 3.22 #2)
> 	id 15bDA2-0007Ua-00; Sun, 26 Aug 2001 23:34:02 -0400
> Date: Sun, 26 Aug 2001 23:34:01 -0400
> From: George Schlossnagle <ge...@omniti.com>
> Content-Type: multipart/alternative;
> 	boundary=Apple-Mail-965253019-1
> Subject: Re: [Spread-users] send text to spread group from command line?
> Cc: george@omniti.com
> To: Ben Laurie <be...@algroup.co.uk>
> X-Mailer: Apple Mail (2.388)
> In-Reply-To: <3B...@algroup.co.uk>
> Mime-Version: 1.0 (Apple Message framework v388)
> Message-Id: <E1...@longsword.omniti.com>
> 
> Hi Ben,
>
> I have a patch to httpd-2_0_18-alpha that does what I'm looking for.
> Don't know the appropriate place to submit it.  I've attached it on the
> off chance direct-to-you is ok.
>
> Best,
>
> George
>
> 1024D/1100A5A0/1370 F70A 9365 96C9 2F5E  56C2 B2B9 262F 1100 A5A0
>
>
>
> <Attachment missing>

----------------------------------------
Content-Type: text/plain; charset="us-ascii"; name="Attachment: 1"
Content-Transfer-Encoding: 7bit
Content-Description: 
----------------------------------------

----------------------------------------
Content-Type: application/octet-stream; charset="us-ascii"; name="error_log.patch"
Content-Transfer-Encoding: quoted-printable
Content-Description: 
----------------------------------------

-- 

______________________________________________________________
Ryan Bloom                        	rbb@apache.org
Covalent Technologies			rbb@covalent.net
--------------------------------------------------------------